Skip to content

Commit

Permalink
Update based on comment
Browse files Browse the repository at this point in the history
  • Loading branch information
aMannus committed Jan 31, 2024
1 parent 89e39d2 commit 0b54d8a
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 8 deletions.
7 changes: 2 additions & 5 deletions soh/soh/Enhancements/randomizer/randomizer_check_tracker.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -264,8 +264,6 @@ void RecalculateAreaTotals() {
}
}
}

CalculateTotals();
}

void SetCheckCollected(RandomizerCheck rc) {
Expand All @@ -288,7 +286,6 @@ void SetCheckCollected(RandomizerCheck rc) {
doAreaScroll = true;
UpdateOrdering(rcObj.rcArea);
UpdateInventoryChecks();
CalculateTotals();
}

bool IsAreaScene(SceneID sceneNum) {
Expand Down Expand Up @@ -527,7 +524,6 @@ void CheckTrackerLoadGame(int32_t fileNum) {
initialized = true;
UpdateAllOrdering();
UpdateInventoryChecks();
CalculateTotals();
}

void CheckTrackerShopSlotChange(uint8_t cursorSlot, int16_t basePrice) {
Expand Down Expand Up @@ -848,7 +844,6 @@ void UpdateCheck(uint32_t check, RandomizerCheckTrackerData data) {
}
gSaveContext.checkTrackerData[check] = data;
UpdateOrdering(area);
CalculateTotals();
}

void CheckTrackerWindow::DrawElement() {
Expand Down Expand Up @@ -1280,6 +1275,8 @@ void UpdateOrdering(RandomizerCheckArea rcArea) {
if(checksByArea.contains(rcArea)) {
std::sort(checksByArea.find(rcArea)->second.begin(), checksByArea.find(rcArea)->second.end(), CompareChecks);
}

CalculateTotals();
}

bool IsEoDCheck(RandomizerCheckType type) {
Expand Down
6 changes: 3 additions & 3 deletions soh/soh/Enhancements/randomizer/randomizer_item_tracker.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -750,7 +750,7 @@ void DrawTotalChecks() {
uint16_t totalChecksGotten = CheckTracker::GetTotalChecksGotten();

ImGui::BeginGroup();
ImGui::SetWindowFontScale(2.0);
ImGui::SetWindowFontScale(2.5);
ImGui::Text("Checks: %d/%d", totalChecksGotten, totalChecks);
ImGui::EndGroup();
}
Expand Down Expand Up @@ -1079,7 +1079,7 @@ void ItemTrackerWindow::DrawElement() {
EndFloatingWindows();
}

if (CVarGetInteger("gItemTrackerTotalChecksDisplayType", SECTION_DISPLAY_MINIMAL_HIDDEN) ==
if (CVarGetInteger("gTrackers.ItemTracker.TotalChecks.DisplayType", SECTION_DISPLAY_MINIMAL_HIDDEN) ==
SECTION_DISPLAY_MINIMAL_SEPARATE) {
ImGui::SetNextWindowSize(ImVec2(400, 300), ImGuiCond_FirstUseEver);
BeginFloatingWindows("Total Checks");
Expand Down Expand Up @@ -1226,7 +1226,7 @@ void ItemTrackerSettingsWindow::DrawElement() {
}
}

if (UIWidgets::LabeledRightAlignedEnhancementCombobox("Total Checks", "gItemTrackerTotalChecksDisplayType", minimalDisplayTypes, SECTION_DISPLAY_MINIMAL_HIDDEN)) {
if (UIWidgets::LabeledRightAlignedEnhancementCombobox("Total Checks", "gTrackers.ItemTracker.TotalChecks.DisplayType", minimalDisplayTypes, SECTION_DISPLAY_MINIMAL_HIDDEN)) {
shouldUpdateVectors = true;
}

Expand Down

0 comments on commit 0b54d8a

Please sign in to comment.