improved model loading and added model component
This commit is contained in:
@@ -28,6 +28,7 @@ namespace OpenEngine {
|
||||
RegisterDrawer<SphereShapeComponent>("Sphere Shape", &SphereShapeOnImGuiRender);
|
||||
RegisterDrawer<BoxShapeComponent>("Box Shape", &BoxShapeOnImGuiRender);
|
||||
RegisterDrawer<PlaneShapeComponent>("Plane Shape", &PlaneShapeOnImGuiRender);
|
||||
RegisterDrawer<ModelComponent>("Model", &ModelOnImGuiRender);
|
||||
|
||||
scene = context;
|
||||
selected_context = {};
|
||||
@@ -81,6 +82,11 @@ namespace OpenEngine {
|
||||
selected_context.AddComponent<PlaneShapeComponent>();
|
||||
ImGui::CloseCurrentPopup();
|
||||
}
|
||||
if (!selected_context.HasComponent<ModelComponent>())
|
||||
if (ImGui::MenuItem("Model")) {
|
||||
selected_context.AddComponent<ModelComponent>();
|
||||
ImGui::CloseCurrentPopup();
|
||||
}
|
||||
}
|
||||
|
||||
void EntityPopup(Ref<Scene>& scene)
|
||||
|
||||
Reference in New Issue
Block a user