GUI: hacky implementation of lock layout

This commit is contained in:
tildearrow 2022-05-22 18:20:53 -05:00
parent 43981eb59f
commit 16afb6d7be

View file

@ -2891,7 +2891,7 @@ bool FurnaceGUI::loop() {
doAction(GUI_ACTION_FULLSCREEN); doAction(GUI_ACTION_FULLSCREEN);
} }
#endif #endif
if (ImGui::MenuItem("lock layout (not working!)",NULL,lockLayout)) { if (ImGui::MenuItem("lock layout",NULL,lockLayout)) {
lockLayout=!lockLayout; lockLayout=!lockLayout;
} }
if (ImGui::MenuItem("visualizer",NULL,fancyPattern)) { if (ImGui::MenuItem("visualizer",NULL,fancyPattern)) {
@ -3022,7 +3022,7 @@ bool FurnaceGUI::loop() {
drawPattern(); drawPattern();
drawPiano(); drawPiano();
} else { } else {
globalWinFlags=0; globalWinFlags=lockLayout?ImGuiWindowFlags_NoMove:0;
ImGui::DockSpaceOverViewport(NULL,lockLayout?(ImGuiDockNodeFlags_NoResize|ImGuiDockNodeFlags_NoCloseButton|ImGuiDockNodeFlags_NoDocking|ImGuiDockNodeFlags_NoDockingSplitMe|ImGuiDockNodeFlags_NoDockingSplitOther):0); ImGui::DockSpaceOverViewport(NULL,lockLayout?(ImGuiDockNodeFlags_NoResize|ImGuiDockNodeFlags_NoCloseButton|ImGuiDockNodeFlags_NoDocking|ImGuiDockNodeFlags_NoDockingSplitMe|ImGuiDockNodeFlags_NoDockingSplitOther):0);
drawSubSongs(); drawSubSongs();