summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoraMannus <mannusmenting@gmail.com>2023-01-28 01:16:31 +0100
committerGitHub <noreply@github.com>2023-01-27 19:16:31 -0500
commit72dcf3466bbff42fd18d13e9dd04214779b1057b (patch)
tree9f028fb330f7eabdbfc4fdd339df640b578c4164
parent0aab836d1f80407ffa09967d7594a02b5d918d88 (diff)
Check tracker fixes (#2414)
-rw-r--r--soh/soh/Enhancements/randomizer/randomizer_check_tracker.cpp10
1 files changed, 6 insertions, 4 deletions
diff --git a/soh/soh/Enhancements/randomizer/randomizer_check_tracker.cpp b/soh/soh/Enhancements/randomizer/randomizer_check_tracker.cpp
index f8a3c19c2..9523c4857 100644
--- a/soh/soh/Enhancements/randomizer/randomizer_check_tracker.cpp
+++ b/soh/soh/Enhancements/randomizer/randomizer_check_tracker.cpp
@@ -25,7 +25,7 @@ void InitializeChecks();
void UpdateChecks();
void UpdateInventoryChecks();
void DrawLocation(RandomizerCheckObject rcObj, RandomizerCheckShow* thisCheckStatus);
-void BeginFloatWindows(std::string UniqueName, ImGuiWindowFlags flags = 0);
+void BeginFloatWindows(std::string UniqueName, bool& open, ImGuiWindowFlags flags = 0);
void EndFloatWindows();
void UpdateOrdering(bool init = false);
bool ShouldUpdateChecks();
@@ -113,6 +113,8 @@ void DrawCheckTracker(bool& open) {
return;
}
+ ImGui::SetNextWindowSize(ImVec2(400, 540), ImGuiCond_FirstUseEver);
+
if (doInitialize)
InitializeChecks();
else if (initialized && (gPlayState == nullptr || gSaveContext.fileNum < 0 || gSaveContext.fileNum > 2)) {
@@ -136,7 +138,7 @@ void DrawCheckTracker(bool& open) {
}
}
- BeginFloatWindows("Check Tracker", ImGuiWindowFlags_NoScrollbar);
+ BeginFloatWindows("Check Tracker", open, ImGuiWindowFlags_NoScrollbar);
if (!initialized) {
ImGui::Text("Waiting for file load..."); //TODO Language
@@ -326,7 +328,7 @@ void DrawCheckTracker(bool& open) {
}
// Windowing stuff
-void BeginFloatWindows(std::string UniqueName, ImGuiWindowFlags flags) {
+void BeginFloatWindows(std::string UniqueName, bool& open, ImGuiWindowFlags flags) {
ImGuiWindowFlags windowFlags = flags;
if (windowFlags == 0) {
@@ -347,7 +349,7 @@ void BeginFloatWindows(std::string UniqueName, ImGuiWindowFlags flags) {
Color_Background.b / 255.0f, Color_Background.a / 255.0f));
ImGui::PushStyleColor(ImGuiCol_Border, ImVec4(0, 0, 0, 0));
ImGui::PushStyleVar(ImGuiStyleVar_WindowRounding, 4.0f);
- ImGui::Begin(UniqueName.c_str(), nullptr, windowFlags);
+ ImGui::Begin(UniqueName.c_str(), &open, windowFlags);
}
void EndFloatWindows() {
ImGui::PopStyleVar();