Add temple clears to save editor (#275)

* Add temple clears to save editor

* for each
This commit is contained in:
Archez 2024-04-30 18:33:06 -04:00 committed by Garrett Cox
parent 144fa5cfaf
commit 6da4eee306

View File

@ -314,7 +314,26 @@ void DrawGeneralTab() {
);
ImGui::Text("Banked Rupees: %d", HS_GET_BANK_RUPEES());
UIWidgets::Checkbox("Snowhead Cleared", (bool*)&gSaveContext.save.snowheadCleared, { .color = UIWidgets::Colors::Gray });
// Temple clears
static const std::array<std::pair<int32_t, const char*>, 4> templeClears = { {
{ WEEKEVENTREG_CLEARED_WOODFALL_TEMPLE, "Woodfall Cleared" },
{ WEEKEVENTREG_CLEARED_SNOWHEAD_TEMPLE, "Snowhead Cleared" },
{ WEEKEVENTREG_CLEARED_GREAT_BAY_TEMPLE, "Great Bay Cleared" },
{ WEEKEVENTREG_CLEARED_STONE_TOWER_TEMPLE, "Stone Tower Cleared" },
} };
for (const auto& temple : templeClears) {
bool cleared = CHECK_WEEKEVENTREG(temple.first);
if (UIWidgets::Checkbox(temple.second, &cleared, { .color = UIWidgets::Colors::Gray })) {
if (cleared) {
SET_WEEKEVENTREG(temple.first);
} else {
CLEAR_WEEKEVENTREG(temple.first);
}
}
}
UIWidgets::Checkbox("Has Tatl", (bool*)&gSaveContext.save.hasTatl, { .color = UIWidgets::Colors::Gray });
ImGui::EndGroup();