From 16afb6d7be8940db37309c558f7fd48c74b89e57 Mon Sep 17 00:00:00 2001 From: tildearrow Date: Sun, 22 May 2022 18:20:53 -0500 Subject: [PATCH] GUI: hacky implementation of lock layout --- src/gui/gui.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/gui/gui.cpp b/src/gui/gui.cpp index 9b2e8fdd4..82778a44e 100644 --- a/src/gui/gui.cpp +++ b/src/gui/gui.cpp @@ -2891,7 +2891,7 @@ bool FurnaceGUI::loop() { doAction(GUI_ACTION_FULLSCREEN); } #endif - if (ImGui::MenuItem("lock layout (not working!)",NULL,lockLayout)) { + if (ImGui::MenuItem("lock layout",NULL,lockLayout)) { lockLayout=!lockLayout; } if (ImGui::MenuItem("visualizer",NULL,fancyPattern)) { @@ -3022,7 +3022,7 @@ bool FurnaceGUI::loop() { drawPattern(); drawPiano(); } else { - globalWinFlags=0; + globalWinFlags=lockLayout?ImGuiWindowFlags_NoMove:0; ImGui::DockSpaceOverViewport(NULL,lockLayout?(ImGuiDockNodeFlags_NoResize|ImGuiDockNodeFlags_NoCloseButton|ImGuiDockNodeFlags_NoDocking|ImGuiDockNodeFlags_NoDockingSplitMe|ImGuiDockNodeFlags_NoDockingSplitOther):0); drawSubSongs();