Skip to content

Commit

Permalink
Set Item Tracker Total Checks window to only scale text if Item Track…
Browse files Browse the repository at this point in the history
…er window type is Floating. (HarbourMasters#4963)

Increase default width to account for window type title text.
  • Loading branch information
Malkierian authored Jan 30, 2025
1 parent 7df9641 commit 1744f1f
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions soh/soh/Enhancements/randomizer/randomizer_item_tracker.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -921,7 +921,11 @@ void DrawTotalChecks() {
uint16_t totalChecksGotten = CheckTracker::GetTotalChecksGotten();

ImGui::BeginGroup();
ImGui::SetWindowFontScale(2.5);
if (CVarGetInteger(CVAR_TRACKER_ITEM("WindowType"), TRACKER_WINDOW_FLOATING) == TRACKER_WINDOW_FLOATING) {
ImGui::SetWindowFontScale(2.5);
} else {
ImGui::SetWindowFontScale(1);
}
ImGui::Text("Checks: %d/%d", totalChecksGotten, totalChecks);
ImGui::EndGroup();
}
Expand Down Expand Up @@ -1340,7 +1344,7 @@ void ItemTrackerWindow::DrawElement() {

if (CVarGetInteger("gTrackers.ItemTracker.TotalChecks.DisplayType", SECTION_DISPLAY_MINIMAL_HIDDEN) ==
SECTION_DISPLAY_MINIMAL_SEPARATE) {
ImGui::SetNextWindowSize(ImVec2(400, 300), ImGuiCond_FirstUseEver);
ImGui::SetNextWindowSize(ImVec2(450, 300), ImGuiCond_FirstUseEver);
BeginFloatingWindows("Total Checks");
DrawTotalChecks();
EndFloatingWindows();
Expand Down

0 comments on commit 1744f1f

Please sign in to comment.