diff --git a/openair1/PHY/TOOLS/imscope/imscope.cpp b/openair1/PHY/TOOLS/imscope/imscope.cpp index a858409d9e..a80b5cfd98 100644 --- a/openair1/PHY/TOOLS/imscope/imscope.cpp +++ b/openair1/PHY/TOOLS/imscope/imscope.cpp @@ -733,6 +733,7 @@ void *imscope_thread(void *data_void_ptr) static float t = 0; static bool show_imgui_demo_window = false; static bool show_implot_demo_window = false; + static bool show_scope_settings_window = false; ImGui::DockSpaceOverViewport(); if (ImGui::BeginMainMenuBar()) { if (ImGui::BeginMenu("File")) { @@ -752,6 +753,12 @@ void *imscope_thread(void *data_void_ptr) } ImGui::EndMenu(); } + if (ImGui::BeginMenu("Settings")) { + if (ImGui::MenuItem("Global scope settings")) { + show_scope_settings_window = !show_scope_settings_window; + } + ImGui::EndMenu(); + } ImGui::EndMainMenuBar(); } @@ -762,16 +769,6 @@ void *imscope_thread(void *data_void_ptr) } ImGui::End(); - ImGui::Begin("Global scope settings"); - ImGui::ShowStyleSelector("ImGui Style"); - ImPlot::ShowStyleSelector("ImPlot Style"); - ImPlot::ShowColormapSelector("ImPlot Colormap"); - ImGui::SliderInt("FPS target", &target_fps, 12, 60); - if (ImGui::IsItemHovered()) { - ImGui::SetTooltip("Reduces scope flickering in unfrozen mode. Can reduce impact on perfromance of the modem"); - } - ImGui::End(); - t += ImGui::GetIO().DeltaTime; iq_procedure_timer.UpdateAverage(t); @@ -788,7 +785,19 @@ void *imscope_thread(void *data_void_ptr) ImPlot::ShowDemoWindow(); if (show_imgui_demo_window) ImGui::ShowDemoWindow(); - + // Settings + if (show_scope_settings_window) { + ImGui::SetNextWindowPos(ImGui::GetMainViewport()->GetCenter(), ImGuiCond_FirstUseEver, ImVec2(0.5f, 0.5f)); + ImGui::Begin("Global scope settings", &show_scope_settings_window); + ImGui::ShowStyleSelector("ImGui Style"); + ImPlot::ShowStyleSelector("ImPlot Style"); + ImPlot::ShowColormapSelector("ImPlot Colormap"); + ImGui::SliderInt("FPS target", &target_fps, 12, 60); + if (ImGui::IsItemHovered()) { + ImGui::SetTooltip("Reduces scope flickering in unfrozen mode. Can reduce impact on perfromance of the modem"); + } + ImGui::End(); + } // Rendering ImGui::Render(); glViewport(0, 0, display_w, display_h);