git repos / blockattack-game

commit a4dfc964

Poul Sander · 2025-05-25 10:40
a4dfc96466e80b5d2d70206ad2ad7afd27491a51 patch · browse files
parent 636cde3b74db2247764f772ba4102fd6105b2b1f

ImGui placements are now stored to the save folder

Changed files

M source/code/main.cpp before
diff --git a/source/code/main.cpp b/source/code/main.cpp index 43b167d..a0f888c 100644 --- a/source/code/main.cpp +++ b/source/code/main.cpp
@@ -1308,9 +1308,14 @@ int main(int argc, char* argv[]) {
}
else if (puzzleEditor) {
InitImGui(sdlWindow, renderer, globalData.xsize, globalData.ysize);
+ ImGuiIO& io = ImGui::GetIO();
+ io.IniFilename = nullptr;
+ std::string imgui_inifile = getPathToSaveFiles() + "/imgui.ini";
+ ImGui::LoadIniSettingsFromDisk(imgui_inifile.c_str());
PuzzleEditorState s;
s.Init();
RunImGuiGameState(s);
+ ImGui::SaveIniSettingsToDisk(imgui_inifile.c_str());
}
else if (globalData.replayArgument.length()) {
ReplayPlayer rp;