Added a option to disable drawing axis in the view menu

This commit is contained in:
antopilo
2023-03-06 16:57:07 -05:00
parent a777f37830
commit 0df434282d
3 changed files with 6 additions and 1 deletions

View File

@@ -148,7 +148,7 @@ int main(int argc, char* argv[])
camera = currentScene->m_EditorCamera;
}
if (currentScene && !Nuake::Engine::IsPlayMode)
if (currentScene && !Nuake::Engine::IsPlayMode && editor.ShouldDrawAxis())
{
gizmoDrawer.DrawGizmos(currentScene);
}

View File

@@ -1273,6 +1273,8 @@ namespace Nuake {
if (ImGui::MenuItem("Lighting", NULL, true)) {}
if (ImGui::MenuItem("Draw grid", NULL, m_DrawGrid))
m_DrawGrid = !m_DrawGrid;
if (ImGui::MenuItem("Draw Axis", NULL, m_DrawAxis))
m_DrawAxis = !m_DrawAxis;
if (ImGui::MenuItem("Draw collisions", NULL, m_DebugCollisions))
{
m_DebugCollisions = !m_DebugCollisions;

View File

@@ -14,6 +14,7 @@ namespace Nuake {
{
private:
bool m_DrawGrid = false;
bool m_DrawAxis = true;
bool m_ShowImGuiDemo = false;
bool m_DebugCollisions = false;
bool m_ShowOverlay = true;
@@ -46,5 +47,7 @@ namespace Nuake {
void DrawLogger();
bool EntityContainsItself(Entity ent1, Entity ent2);
void Overlay();
bool ShouldDrawAxis() const { return m_DrawAxis; }
};
}