Removed useless menu items

This commit is contained in:
antopilo
2024-11-20 01:36:52 -05:00
parent e4c11140e0
commit 1063ffcd58

View File

@@ -3325,83 +3325,6 @@ namespace Nuake {
ImGui::EndMenu();
}
if (ImGui::BeginMenu("Entity"))
{
if (ImGui::BeginMenu("Create new"))
{
Entity entity;
if (ImGui::MenuItem("Empty"))
{
entity = Engine::GetCurrentScene()->CreateEntity("Empty entity");
}
if (ImGui::MenuItem("Light"))
{
entity = Engine::GetCurrentScene()->CreateEntity("Light");
entity.AddComponent<LightComponent>();
}
if (ImGui::MenuItem("Camera"))
{
entity = Engine::GetCurrentScene()->CreateEntity("Camera");
entity.AddComponent<CameraComponent>();
}
if (ImGui::MenuItem("Rigidbody"))
{
entity = Engine::GetCurrentScene()->CreateEntity("Rigidbody");
entity.AddComponent<RigidBodyComponent>();
}
if (ImGui::MenuItem("Trenchbroom map"))
{
entity = Engine::GetCurrentScene()->CreateEntity("Trenchbroom map");
entity.AddComponent<QuakeMapComponent>();
}
if (ImGui::MenuItem("Model"))
{
entity = Engine::GetCurrentScene()->CreateEntity("Model");
entity.AddComponent<ModelComponent>();
}
if (entity.IsValid())
{
if (Selection.Type == EditorSelectionType::Entity && Selection.Entity.IsValid())
{
Selection.Entity.AddChild(entity);
}
else
{
auto camera = Engine::GetCurrentScene()->m_EditorCamera;
Vector3 newEntityPos = camera->Translation + camera->Direction;
entity.GetComponent<TransformComponent>().SetLocalPosition(newEntityPos);
}
Selection = EditorSelection(entity);
}
ImGui::EndMenu();
}
if (ImGui::MenuItem("Delete selected", NULL));
if (ImGui::MenuItem("Duplicate selected", NULL)) {}
ImGui::EndMenu();
}
if (ImGui::BeginMenu("Debug"))
{
if (ImGui::MenuItem("Rebuild Shaders", NULL))
{
Nuake::Logger::Log("Rebuilding Shaders...");
Nuake::ShaderManager::RebuildShaders();
Nuake::Logger::Log("Shaders Rebuilt.");
SetStatusMessage("Shaders rebuilt.");
}
ImGui::EndMenu();
}
}
EndMenubar();