From 416f160b3227150f269d09fa79c4761a20ebf202 Mon Sep 17 00:00:00 2001 From: Aemony <10578344+Aemony@users.noreply.github.com> Date: Sun, 8 Oct 2023 01:20:38 +0200 Subject: [PATCH] Moved ImGui debug options to a submenu (#103) --- src/control_panel.cpp | 26 +++++++++++++++----------- 1 file changed, 15 insertions(+), 11 deletions(-) diff --git a/src/control_panel.cpp b/src/control_panel.cpp index 55916ee17..bd74dd437 100644 --- a/src/control_panel.cpp +++ b/src/control_panel.cpp @@ -3654,21 +3654,25 @@ SK_ImGui_ControlPanel (void) eula.show = true; ImGui::Separator (); - - if (ImGui::MenuItem ("ImGui -> Demo", "ImGui Debug", &selected)) - imgui_demo = true; - if (ImGui::MenuItem ("ImGui -> Debug Log", "ImGui Debug", &selected)) - imgui_debug = true; + if (ImGui::BeginMenu ("ImGui Debug")) + { + ImGui::SeparatorText ("ImGui Debug"); + + ImGui::MenuItem ("Demo", "", &imgui_demo); + + ImGui::MenuItem ("Debug Log", "", &imgui_debug); - if (ImGui::MenuItem ("ImGui -> Metrics", "ImGui Debug", &selected)) - imgui_metrics = true; + ImGui::MenuItem ("Metrics", "", &imgui_metrics); - if (ImGui::MenuItem ("ImGui -> About", "ImGui Debug", &selected)) - imgui_about = true; + ImGui::MenuItem ("About", "", &imgui_about); - if (ImGui::MenuItem ("ImPlot -> Demo", "ImPlot Debug",&selected)) - implot_demo = true; + ImGui::SeparatorText ("ImPlot Debug"); + + ImGui::MenuItem (" Demo", "",&implot_demo); + + ImGui::EndMenu ( ); + } ImGui::Separator ();