diff options
| author | Garrett Cox <garrettjcox@gmail.com> | 2025-01-25 09:53:11 -0600 |
|---|---|---|
| committer | Garrett Cox <garrettjcox@gmail.com> | 2025-01-25 10:24:56 -0600 |
| commit | 4fafa019210d3eb16b784354a60a4ca48bcb4b94 (patch) | |
| tree | 0d3e266ba44ed8e2bd6ea745c5d7fcac1e0a19fd /mm/2s2h/DeveloperTools | |
| parent | 8fecd2e2ad8702d4e564f1f4509c4c7c388dcd20 (diff) | |
| parent | 74cccd04891c5d5682462fb1d2a9e828fe432420 (diff) | |
Merge branch 'develop' of garrettjoecox.github.com:HarbourMasters/2ship2harkinian into develop-rando
Diffstat (limited to 'mm/2s2h/DeveloperTools')
| -rw-r--r-- | mm/2s2h/DeveloperTools/ActorViewer.cpp | 10 | ||||
| -rw-r--r-- | mm/2s2h/DeveloperTools/EventLog.cpp | 5 | ||||
| -rw-r--r-- | mm/2s2h/DeveloperTools/SaveEditor.cpp | 151 |
3 files changed, 85 insertions, 81 deletions
diff --git a/mm/2s2h/DeveloperTools/ActorViewer.cpp b/mm/2s2h/DeveloperTools/ActorViewer.cpp index 545a10d9d..425ad14e2 100644 --- a/mm/2s2h/DeveloperTools/ActorViewer.cpp +++ b/mm/2s2h/DeveloperTools/ActorViewer.cpp @@ -190,11 +190,11 @@ void ActorViewerWindow::DrawElement() { ImGui::SeparatorText("Options"); toggled = UIWidgets::CVarCheckbox("Actor Name Tags", CVAR_ACTOR_NAME_TAGS("Enabled"), - { .tooltip = "Adds \"name tags\" above actors for identification" }); + { { .tooltip = "Adds \"name tags\" above actors for identification" } }); ImGui::SameLine(); - UIWidgets::Button("Display Items", { .tooltip = "Click to add display items on the name tags" }); + UIWidgets::Button("Display Items", { { .tooltip = "Click to add display items on the name tags" } }); if (ImGui::BeginPopupContextItem(nullptr, ImGuiPopupFlags_MouseButtonLeft | ImGuiPopupFlags_NoReopen)) { optionChange |= UIWidgets::CVarCheckbox("ID", CVAR_ACTOR_NAME_TAGS("DisplayID")); @@ -207,7 +207,7 @@ void ActorViewerWindow::DrawElement() { optionChange |= UIWidgets::CVarCheckbox( "Name tags with Z-Buffer", CVAR_ACTOR_NAME_TAGS("WithZBuffer"), - { .tooltip = "Allow name tags to be obstructed when behind geometry and actors" }); + { { .tooltip = "Allow name tags to be obstructed when behind geometry and actors" } }); if (toggled || optionChange) { bool tagsEnabled = CVarGetInteger(CVAR_ACTOR_NAME_TAGS("Enabled"), 0); @@ -349,13 +349,13 @@ void ActorViewerWindow::DrawElement() { } } - if (UIWidgets::Button("Fetch: Target", { .tooltip = "Grabs actor with target arrow above it." })) { + if (UIWidgets::Button("Fetch: Target", { { .tooltip = "Grabs actor with target arrow above it." } })) { Player* player = GET_PLAYER(gPlayState); if (player->lockOnActor != nullptr) { SetSelectedActor(player->lockOnActor); } } - if (UIWidgets::Button("Fetch: Held", { .tooltip = "Grabs actor Link is currently holding." })) { + if (UIWidgets::Button("Fetch: Held", { { .tooltip = "Grabs actor Link is currently holding." } })) { Player* player = GET_PLAYER(gPlayState); if (player->heldActor != nullptr) { SetSelectedActor(player->heldActor); diff --git a/mm/2s2h/DeveloperTools/EventLog.cpp b/mm/2s2h/DeveloperTools/EventLog.cpp index c4a5c35f8..353b40703 100644 --- a/mm/2s2h/DeveloperTools/EventLog.cpp +++ b/mm/2s2h/DeveloperTools/EventLog.cpp @@ -263,7 +263,7 @@ void EventLogWindow::DrawElement() { ImGui::SameLine(); - if (UIWidgets::Button("Filters", { .size = UIWidgets::Sizes::Inline })) { + if (UIWidgets::Button("Filters", UIWidgets::ButtonOptions{}.Size(UIWidgets::Sizes::Inline))) { ImGui::OpenPopup("eventLogFiltersPopup"); } @@ -348,7 +348,8 @@ void EventLogWindow::DrawElement() { ImGui::SameLine(0); - if (UIWidgets::Button("Clear", { .color = UIWidgets::Colors::Red, .size = UIWidgets::Sizes::Inline })) { + if (UIWidgets::Button("Clear", + UIWidgets::ButtonOptions{ .color = UIWidgets::Colors::Red }.Size(UIWidgets::Sizes::Inline))) { eventLogEntries.clear(); } diff --git a/mm/2s2h/DeveloperTools/SaveEditor.cpp b/mm/2s2h/DeveloperTools/SaveEditor.cpp index c57fa13f2..13adc44da 100644 --- a/mm/2s2h/DeveloperTools/SaveEditor.cpp +++ b/mm/2s2h/DeveloperTools/SaveEditor.cpp @@ -63,13 +63,15 @@ constexpr u8 WALLET_LEVEL_MAX = 2; ImVec4 colorTint; const char* songTooltip; const char* curForm; -ImVec4 formColor; +UIWidgets::Colors formColor; uint32_t formObject; static std::unordered_map<RandoItemId, const char*> randoItemIdComboboxMap; InventorySlot selectedInventorySlot = SLOT_NONE; std::vector<ItemId> safeItemsForInventorySlot[SLOT_MASK_FIERCE_DEITY + 1] = {}; +using namespace UIWidgets; + void initSafeItemsForInventorySlot() { for (int i = 0; i < sizeof(gItemSlots); i++) { InventorySlot slot = static_cast<InventorySlot>(gItemSlots[i]); @@ -260,7 +262,7 @@ void DrawTempleClears() { } else { open = CHECK_WEEKEVENTREG(WEEKEVENTREG_20_01); } - if (UIWidgets::Checkbox("Woodfall Open", &open, { .disabled = cleared })) { + if (UIWidgets::Checkbox("Woodfall Open", &open, { { .disabled = cleared } })) { if (open) { SET_WEEKEVENTREG(WEEKEVENTREG_20_01); } else { @@ -286,7 +288,7 @@ void DrawTempleClears() { } else { open = CHECK_WEEKEVENTREG(WEEKEVENTREG_30_01); } - if (UIWidgets::Checkbox("Snowhead Open", &open, { .disabled = cleared })) { + if (UIWidgets::Checkbox("Snowhead Open", &open, { { .disabled = cleared } })) { if (open) { SET_WEEKEVENTREG(WEEKEVENTREG_30_01); } else { @@ -315,7 +317,7 @@ void DrawTempleClears() { } else { open = CHECK_WEEKEVENTREG(WEEKEVENTREG_53_20); } - if (UIWidgets::Checkbox("Great Bay Open", &open, { .disabled = cleared })) { + if (UIWidgets::Checkbox("Great Bay Open", &open, { { .disabled = cleared } })) { if (open) { SET_WEEKEVENTREG(WEEKEVENTREG_53_20); SET_WEEKEVENTREG(WEEKEVENTREG_93_08); @@ -342,8 +344,9 @@ void DrawTempleClears() { ImGui::SameLine(); - if (UIWidgets::Checkbox("Stone Tower Inverted", &inverted, - { .disabled = !inStoneTower, .disabledTooltip = "Can only invert while in Stone Tower" })) { + if (UIWidgets::Checkbox( + "Stone Tower Inverted", &inverted, + { { .disabled = !inStoneTower, .disabledTooltip = "Can only invert while in Stone Tower" } })) { if (inverted) { Flags_SetSwitch(gPlayState, 20); } else { @@ -403,7 +406,7 @@ void DrawGeneralTab() { ImGui::EndGroup(); ImGui::BeginGroup(); - if (UIWidgets::Button("Max Health", { .color = UIWidgets::Colors::Red, .size = UIWidgets::Sizes::Inline })) { + if (UIWidgets::Button("Max Health", { .size = UIWidgets::Sizes::Inline, .color = UIWidgets::Colors::Red })) { gSaveContext.save.saveInfo.playerData.doubleDefense = 1; gSaveContext.save.saveInfo.inventory.defenseHearts = 20; gSaveContext.save.saveInfo.playerData.healthCapacity = gSaveContext.save.saveInfo.playerData.health = 20 * 16; @@ -411,7 +414,7 @@ void DrawGeneralTab() { } ImGui::SameLine(); if (UIWidgets::Button("Reset##resetHealthButton", - { .color = UIWidgets::Colors::Gray, .size = UIWidgets::Sizes::Inline })) { + { .size = UIWidgets::Sizes::Inline, .color = UIWidgets::Colors::Gray })) { gSaveContext.save.saveInfo.playerData.doubleDefense = 0; gSaveContext.save.saveInfo.inventory.defenseHearts = 0; gSaveContext.save.saveInfo.playerData.healthCapacity = gSaveContext.save.saveInfo.playerData.health = 3 * 16; @@ -447,7 +450,8 @@ void DrawGeneralTab() { }; for (size_t i = 0; i < timeSkipAmounts.size(); i++) { const auto& skip = timeSkipAmounts.at(i); - if (UIWidgets::Button(skip.second, { .color = UIWidgets::Colors::Indigo, .size = UIWidgets::Sizes::Inline })) { + if (UIWidgets::Button(skip.second, + { .size = UIWidgets::Sizes::Inline, .color = UIWidgets::Colors::LightBlue })) { UpdateGameTime(gSaveContext.save.time + CLOCK_TIME(0, skip.first)); } if (i < timeSkipAmounts.size() - 1) { @@ -489,7 +493,7 @@ void DrawGeneralTab() { ImGui::EndGroup(); ImGui::BeginGroup(); - if (UIWidgets::Button("Max Magic", { .color = UIWidgets::Colors::DarkGreen, .size = UIWidgets::Sizes::Inline })) { + if (UIWidgets::Button("Max Magic", { .size = UIWidgets::Sizes::Inline, .color = UIWidgets::Colors::DarkGreen })) { gSaveContext.magicCapacity = gSaveContext.save.saveInfo.playerData.magic = MAGIC_DOUBLE_METER; gSaveContext.save.saveInfo.playerData.magicLevel = 2; gSaveContext.save.saveInfo.playerData.isMagicAcquired = true; @@ -498,7 +502,7 @@ void DrawGeneralTab() { } ImGui::SameLine(); if (UIWidgets::Button("Reset##resetMagicButton", - { .color = UIWidgets::Colors::Gray, .size = UIWidgets::Sizes::Inline })) { + { .size = UIWidgets::Sizes::Inline, .color = UIWidgets::Colors::Gray })) { gSaveContext.magicCapacity = gSaveContext.save.saveInfo.playerData.magic = 0; gSaveContext.save.saveInfo.playerData.magicLevel = 0; gSaveContext.save.saveInfo.playerData.isMagicAcquired = false; @@ -545,13 +549,13 @@ void DrawGeneralTab() { ImGui::SameLine(); ImGui::BeginGroup(); - if (UIWidgets::Button("Max Rupees", { .color = UIWidgets::Colors::Green, .size = UIWidgets::Sizes::Inline })) { + if (UIWidgets::Button("Max Rupees", { .size = UIWidgets::Sizes::Inline, .color = UIWidgets::Colors::Green })) { Inventory_ChangeUpgrade(UPG_WALLET, 2); gSaveContext.save.saveInfo.playerData.rupees = CUR_CAPACITY(UPG_WALLET); } ImGui::SameLine(); if (UIWidgets::Button("Reset##resetRupeesButton", - { .color = UIWidgets::Colors::Gray, .size = UIWidgets::Sizes::Inline })) { + { .size = UIWidgets::Sizes::Inline, .color = UIWidgets::Colors::Gray })) { gSaveContext.save.saveInfo.playerData.rupees = 0; Inventory_ChangeUpgrade(UPG_WALLET, 0); } @@ -1115,7 +1119,7 @@ void DrawQuestStatusTab() { ImGui::PushStyleVar(ImGuiStyleVar_ItemSpacing, ImVec2(8.0f, 8.0f)); ImGui::BeginChild("questTab", ImVec2(0, 0), true); - if (UIWidgets::Button("Give All##items", { .color = UIWidgets::Colors::Green, .size = UIWidgets::Sizes::Inline })) { + if (UIWidgets::Button("Give All##items", { .size = UIWidgets::Sizes::Inline, .color = UIWidgets::Colors::Green })) { for (int32_t i = QUEST_REMAINS_ODOLWA; i <= QUEST_BOMBERS_NOTEBOOK; i++) { if (i != QUEST_SHIELD && i != QUEST_SWORD) { SET_QUEST_ITEM(i); @@ -1133,7 +1137,7 @@ void DrawQuestStatusTab() { } } ImGui::SameLine(); - if (UIWidgets::Button("Reset##items", { .color = UIWidgets::Colors::Red, .size = UIWidgets::Sizes::Inline })) { + if (UIWidgets::Button("Reset##items", { .size = UIWidgets::Sizes::Inline, .color = UIWidgets::Colors::Red })) { for (int32_t i = QUEST_REMAINS_ODOLWA; i <= QUEST_BOMBERS_NOTEBOOK; i++) { if (i != QUEST_SHIELD && i != QUEST_SWORD) { REMOVE_QUEST_ITEM(i); @@ -1355,12 +1359,12 @@ void GetPlayerForm(uint32_t form) { break; case PLAYER_FORM_GORON: curForm = "Goron"; - formColor = UIWidgets::Colors::Yellow; + formColor = UIWidgets::Colors::Brown; formObject = OBJECT_LINK_GORON; break; case PLAYER_FORM_ZORA: curForm = "Zora"; - formColor = UIWidgets::Colors::Indigo; + formColor = UIWidgets::Colors::LightBlue; formObject = OBJECT_LINK_ZORA; break; case PLAYER_FORM_DEKU: @@ -1370,7 +1374,7 @@ void GetPlayerForm(uint32_t form) { break; case PLAYER_FORM_HUMAN: curForm = "Human"; - formColor = UIWidgets::Colors::LightGreen; + formColor = UIWidgets::Colors::Green; formObject = OBJECT_LINK_CHILD; break; default: @@ -1473,7 +1477,7 @@ void DrawPlayerTab() { static int currentWeapon = 0; static int currentShield = 0; - UIWidgets::PushStyleCombobox(UIWidgets::Colors::LightGreen); + UIWidgets::PushStyleCombobox(UIWidgets::Colors::Green); ImGui::PushItemWidth(ImGui::GetFontSize() * 15); if (ImGui::BeginCombo("Equipped Sword", weaponCombo[currentWeapon])) { for (int i = EQUIP_VALUE_SWORD_KOKIRI; i <= EQUIP_VALUE_SWORD_GILDED; i++) { @@ -1632,10 +1636,8 @@ void DrawFlagsTab() { }); if (gPlayState != NULL) { ImGui::SameLine(); - if (UIWidgets::Button("Current", { - .color = UIWidgets::Colors::Gray, - .size = UIWidgets::Sizes::Inline, - })) { + if (UIWidgets::Button("Current", UIWidgets::ButtonOptions{ { .color = UIWidgets::Colors::Gray } }.Size( + UIWidgets::Sizes::Inline))) { selectedScene = gPlayState->sceneId; } } @@ -1654,12 +1656,12 @@ void DrawFlagsTab() { ImGui::Text("switches[0]"); ImGui::SameLine(110); if (UIWidgets::Button("All##switches0", - { .color = UIWidgets::Colors::Gray, .size = UIWidgets::Sizes::Inline })) { + { .size = UIWidgets::Sizes::Inline, .color = UIWidgets::Colors::Gray })) { gPlayState->actorCtx.sceneFlags.switches[0] = UINT32_MAX; } ImGui::SameLine(); if (UIWidgets::Button("Clear##switches0", - { .color = UIWidgets::Colors::Red, .size = UIWidgets::Sizes::Inline })) { + { .size = UIWidgets::Sizes::Inline, .color = UIWidgets::Colors::Red })) { gPlayState->actorCtx.sceneFlags.switches[0] = 0; } UIWidgets::DrawFlagArray32("##switches0", gPlayState->actorCtx.sceneFlags.switches[0]); @@ -1670,12 +1672,12 @@ void DrawFlagsTab() { ImGui::Text("switches[1]"); ImGui::SameLine(110); if (UIWidgets::Button("All##switches1", - { .color = UIWidgets::Colors::Gray, .size = UIWidgets::Sizes::Inline })) { + { .size = UIWidgets::Sizes::Inline, .color = UIWidgets::Colors::Gray })) { gPlayState->actorCtx.sceneFlags.switches[1] = UINT32_MAX; } ImGui::SameLine(); if (UIWidgets::Button("Clear##switches1", - { .color = UIWidgets::Colors::Red, .size = UIWidgets::Sizes::Inline })) { + { .size = UIWidgets::Sizes::Inline, .color = UIWidgets::Colors::Red })) { gPlayState->actorCtx.sceneFlags.switches[1] = 0; } UIWidgets::DrawFlagArray32("##switches1", gPlayState->actorCtx.sceneFlags.switches[1]); @@ -1685,12 +1687,12 @@ void DrawFlagsTab() { ImGui::Text("switches[2]"); ImGui::SameLine(110); if (UIWidgets::Button("All##switches2", - { .color = UIWidgets::Colors::Gray, .size = UIWidgets::Sizes::Inline })) { + { .size = UIWidgets::Sizes::Inline, .color = UIWidgets::Colors::Gray })) { gPlayState->actorCtx.sceneFlags.switches[2] = UINT32_MAX; } ImGui::SameLine(); if (UIWidgets::Button("Clear##switches2", - { .color = UIWidgets::Colors::Red, .size = UIWidgets::Sizes::Inline })) { + { .size = UIWidgets::Sizes::Inline, .color = UIWidgets::Colors::Red })) { gPlayState->actorCtx.sceneFlags.switches[2] = 0; } UIWidgets::DrawFlagArray32("##switches2", gPlayState->actorCtx.sceneFlags.switches[2]); @@ -1701,12 +1703,12 @@ void DrawFlagsTab() { ImGui::Text("switches[3]"); ImGui::SameLine(110); if (UIWidgets::Button("All##switches3", - { .color = UIWidgets::Colors::Gray, .size = UIWidgets::Sizes::Inline })) { + { .size = UIWidgets::Sizes::Inline, .color = UIWidgets::Colors::Gray })) { gPlayState->actorCtx.sceneFlags.switches[3] = UINT32_MAX; } ImGui::SameLine(); if (UIWidgets::Button("Clear##switches3", - { .color = UIWidgets::Colors::Red, .size = UIWidgets::Sizes::Inline })) { + { .size = UIWidgets::Sizes::Inline, .color = UIWidgets::Colors::Red })) { gPlayState->actorCtx.sceneFlags.switches[3] = 0; } UIWidgets::DrawFlagArray32("##switches3", gPlayState->actorCtx.sceneFlags.switches[3]); @@ -1716,12 +1718,12 @@ void DrawFlagsTab() { ImGui::Text("chest"); ImGui::SameLine(110); if (UIWidgets::Button("All##chest", - { .color = UIWidgets::Colors::Gray, .size = UIWidgets::Sizes::Inline })) { + { .size = UIWidgets::Sizes::Inline, .color = UIWidgets::Colors::Gray })) { gPlayState->actorCtx.sceneFlags.chest = UINT32_MAX; } ImGui::SameLine(); if (UIWidgets::Button("Clear##chest", - { .color = UIWidgets::Colors::Red, .size = UIWidgets::Sizes::Inline })) { + { .size = UIWidgets::Sizes::Inline, .color = UIWidgets::Colors::Red })) { gPlayState->actorCtx.sceneFlags.chest = 0; } UIWidgets::DrawFlagArray32("##chest", gPlayState->actorCtx.sceneFlags.chest); @@ -1732,12 +1734,12 @@ void DrawFlagsTab() { ImGui::Text("clearedRoom"); ImGui::SameLine(110); if (UIWidgets::Button("All##clearedRoom", - { .color = UIWidgets::Colors::Gray, .size = UIWidgets::Sizes::Inline })) { + { .size = UIWidgets::Sizes::Inline, .color = UIWidgets::Colors::Gray })) { gPlayState->actorCtx.sceneFlags.clearedRoom = UINT32_MAX; } ImGui::SameLine(); if (UIWidgets::Button("Clear##clearedRoom", - { .color = UIWidgets::Colors::Red, .size = UIWidgets::Sizes::Inline })) { + { .size = UIWidgets::Sizes::Inline, .color = UIWidgets::Colors::Red })) { gPlayState->actorCtx.sceneFlags.clearedRoom = 0; } UIWidgets::DrawFlagArray32("##clearedRoom", gPlayState->actorCtx.sceneFlags.clearedRoom); @@ -1747,12 +1749,12 @@ void DrawFlagsTab() { ImGui::Text("clearedRoomTemp"); ImGui::SameLine(110); if (UIWidgets::Button("All##clearedRoomTemp", - { .color = UIWidgets::Colors::Gray, .size = UIWidgets::Sizes::Inline })) { + { .size = UIWidgets::Sizes::Inline, .color = UIWidgets::Colors::Gray })) { gPlayState->actorCtx.sceneFlags.clearedRoomTemp = UINT32_MAX; } ImGui::SameLine(); if (UIWidgets::Button("Clear##clearedRoomTemp", - { .color = UIWidgets::Colors::Red, .size = UIWidgets::Sizes::Inline })) { + { .size = UIWidgets::Sizes::Inline, .color = UIWidgets::Colors::Red })) { gPlayState->actorCtx.sceneFlags.clearedRoomTemp = 0; } UIWidgets::DrawFlagArray32("##clearedRoomTemp", gPlayState->actorCtx.sceneFlags.clearedRoomTemp); @@ -1763,12 +1765,12 @@ void DrawFlagsTab() { ImGui::Text("collectible[0]"); ImGui::SameLine(110); if (UIWidgets::Button("All##collectible0", - { .color = UIWidgets::Colors::Gray, .size = UIWidgets::Sizes::Inline })) { + { .size = UIWidgets::Sizes::Inline, .color = UIWidgets::Colors::Gray })) { gPlayState->actorCtx.sceneFlags.collectible[0] = UINT32_MAX; } ImGui::SameLine(); if (UIWidgets::Button("Clear##collectible0", - { .color = UIWidgets::Colors::Red, .size = UIWidgets::Sizes::Inline })) { + { .size = UIWidgets::Sizes::Inline, .color = UIWidgets::Colors::Red })) { gPlayState->actorCtx.sceneFlags.collectible[0] = 0; } UIWidgets::DrawFlagArray32("##collectible0", gPlayState->actorCtx.sceneFlags.collectible[0]); @@ -1778,12 +1780,12 @@ void DrawFlagsTab() { ImGui::Text("collectible[1]"); ImGui::SameLine(110); if (UIWidgets::Button("All##collectible1", - { .color = UIWidgets::Colors::Gray, .size = UIWidgets::Sizes::Inline })) { + { .size = UIWidgets::Sizes::Inline, .color = UIWidgets::Colors::Gray })) { gPlayState->actorCtx.sceneFlags.collectible[1] = UINT32_MAX; } ImGui::SameLine(); if (UIWidgets::Button("Clear##collectible1", - { .color = UIWidgets::Colors::Red, .size = UIWidgets::Sizes::Inline })) { + { .size = UIWidgets::Sizes::Inline, .color = UIWidgets::Colors::Red })) { gPlayState->actorCtx.sceneFlags.collectible[1] = 0; } UIWidgets::DrawFlagArray32("##collectible1", gPlayState->actorCtx.sceneFlags.collectible[1]); @@ -1794,12 +1796,12 @@ void DrawFlagsTab() { ImGui::Text("collectible[2]"); ImGui::SameLine(110); if (UIWidgets::Button("All##collectible2", - { .color = UIWidgets::Colors::Gray, .size = UIWidgets::Sizes::Inline })) { + { .size = UIWidgets::Sizes::Inline, .color = UIWidgets::Colors::Gray })) { gPlayState->actorCtx.sceneFlags.collectible[2] = UINT32_MAX; } ImGui::SameLine(); if (UIWidgets::Button("Clear##collectible2", - { .color = UIWidgets::Colors::Red, .size = UIWidgets::Sizes::Inline })) { + { .size = UIWidgets::Sizes::Inline, .color = UIWidgets::Colors::Red })) { gPlayState->actorCtx.sceneFlags.collectible[2] = 0; } UIWidgets::DrawFlagArray32("##collectible2", gPlayState->actorCtx.sceneFlags.collectible[2]); @@ -1809,12 +1811,12 @@ void DrawFlagsTab() { ImGui::Text("collectible[3]"); ImGui::SameLine(110); if (UIWidgets::Button("All##collectible3", - { .color = UIWidgets::Colors::Gray, .size = UIWidgets::Sizes::Inline })) { + { .size = UIWidgets::Sizes::Inline, .color = UIWidgets::Colors::Gray })) { gPlayState->actorCtx.sceneFlags.collectible[3] = UINT32_MAX; } ImGui::SameLine(); if (UIWidgets::Button("Clear##collectible3", - { .color = UIWidgets::Colors::Red, .size = UIWidgets::Sizes::Inline })) { + { .size = UIWidgets::Sizes::Inline, .color = UIWidgets::Colors::Red })) { gPlayState->actorCtx.sceneFlags.collectible[3] = 0; } UIWidgets::DrawFlagArray32("##collectible3", gPlayState->actorCtx.sceneFlags.collectible[3]); @@ -1840,14 +1842,14 @@ void DrawFlagsTab() { break; case 3: // scenesVisible if (UIWidgets::Button("All##scenesVisible", - { .color = UIWidgets::Colors::Gray, .size = UIWidgets::Sizes::Inline })) { + { .size = UIWidgets::Sizes::Inline, .color = UIWidgets::Colors::Gray })) { for (int i = 0; i < 7; i++) { gSaveContext.save.saveInfo.scenesVisible[i] = UINT32_MAX; } } ImGui::SameLine(); if (UIWidgets::Button("Clear##scenesVisible", - { .color = UIWidgets::Colors::Red, .size = UIWidgets::Sizes::Inline })) { + { .size = UIWidgets::Sizes::Inline, .color = UIWidgets::Colors::Red })) { for (int i = 0; i < 7; i++) { gSaveContext.save.saveInfo.scenesVisible[i] = 0; } @@ -1860,12 +1862,12 @@ void DrawFlagsTab() { break; case 4: // owlActivation if (UIWidgets::Button("All##owlActivationFlags", - { .color = UIWidgets::Colors::Gray, .size = UIWidgets::Sizes::Inline })) { + { .size = UIWidgets::Sizes::Inline, .color = UIWidgets::Colors::Gray })) { gSaveContext.save.saveInfo.playerData.owlActivationFlags = UINT16_MAX; } ImGui::SameLine(); if (UIWidgets::Button("Clear##owlActivationFlags", - { .color = UIWidgets::Colors::Red, .size = UIWidgets::Sizes::Inline })) { + { .size = UIWidgets::Sizes::Inline, .color = UIWidgets::Colors::Red })) { gSaveContext.save.saveInfo.playerData.owlActivationFlags = 0; } UIWidgets::DrawFlagArray16("##owlActivationFlags", @@ -1877,12 +1879,12 @@ void DrawFlagsTab() { ImGui::Text("chest"); ImGui::SameLine(110); if (UIWidgets::Button("All##chest", - { .color = UIWidgets::Colors::Gray, .size = UIWidgets::Sizes::Inline })) { + { .size = UIWidgets::Sizes::Inline, .color = UIWidgets::Colors::Gray })) { gSaveContext.save.saveInfo.permanentSceneFlags[selectedScene].chest = UINT32_MAX; } ImGui::SameLine(); if (UIWidgets::Button("Clear##chest", - { .color = UIWidgets::Colors::Red, .size = UIWidgets::Sizes::Inline })) { + { .size = UIWidgets::Sizes::Inline, .color = UIWidgets::Colors::Red })) { gSaveContext.save.saveInfo.permanentSceneFlags[selectedScene].chest = 0; } UIWidgets::DrawFlagArray32("##chest", gSaveContext.save.saveInfo.permanentSceneFlags[selectedScene].chest); @@ -1893,12 +1895,12 @@ void DrawFlagsTab() { ImGui::Text("switch0"); ImGui::SameLine(110); if (UIWidgets::Button("All##switch0", - { .color = UIWidgets::Colors::Gray, .size = UIWidgets::Sizes::Inline })) { + { .size = UIWidgets::Sizes::Inline, .color = UIWidgets::Colors::Gray })) { gSaveContext.save.saveInfo.permanentSceneFlags[selectedScene].switch0 = UINT32_MAX; } ImGui::SameLine(); if (UIWidgets::Button("Clear##switch0", - { .color = UIWidgets::Colors::Red, .size = UIWidgets::Sizes::Inline })) { + { .size = UIWidgets::Sizes::Inline, .color = UIWidgets::Colors::Red })) { gSaveContext.save.saveInfo.permanentSceneFlags[selectedScene].switch0 = 0; } UIWidgets::DrawFlagArray32("##switch0", @@ -1909,12 +1911,12 @@ void DrawFlagsTab() { ImGui::Text("collectible"); ImGui::SameLine(110); if (UIWidgets::Button("All##collectible", - { .color = UIWidgets::Colors::Gray, .size = UIWidgets::Sizes::Inline })) { + { .size = UIWidgets::Sizes::Inline, .color = UIWidgets::Colors::Gray })) { gSaveContext.save.saveInfo.permanentSceneFlags[selectedScene].collectible = UINT32_MAX; } ImGui::SameLine(); if (UIWidgets::Button("Clear##collectible", - { .color = UIWidgets::Colors::Red, .size = UIWidgets::Sizes::Inline })) { + { .size = UIWidgets::Sizes::Inline, .color = UIWidgets::Colors::Red })) { gSaveContext.save.saveInfo.permanentSceneFlags[selectedScene].collectible = 0; } UIWidgets::DrawFlagArray32("##collectible", @@ -1926,12 +1928,12 @@ void DrawFlagsTab() { ImGui::Text("switch1"); ImGui::SameLine(110); if (UIWidgets::Button("All##switch1", - { .color = UIWidgets::Colors::Gray, .size = UIWidgets::Sizes::Inline })) { + { .size = UIWidgets::Sizes::Inline, .color = UIWidgets::Colors::Gray })) { gSaveContext.save.saveInfo.permanentSceneFlags[selectedScene].switch1 = UINT32_MAX; } ImGui::SameLine(); if (UIWidgets::Button("Clear##switch1", - { .color = UIWidgets::Colors::Red, .size = UIWidgets::Sizes::Inline })) { + { .size = UIWidgets::Sizes::Inline, .color = UIWidgets::Colors::Red })) { gSaveContext.save.saveInfo.permanentSceneFlags[selectedScene].switch1 = 0; } UIWidgets::DrawFlagArray32("##switch1", @@ -1942,12 +1944,12 @@ void DrawFlagsTab() { ImGui::Text("clearedRoom"); ImGui::SameLine(110); if (UIWidgets::Button("All##clearedRoom", - { .color = UIWidgets::Colors::Gray, .size = UIWidgets::Sizes::Inline })) { + { .size = UIWidgets::Sizes::Inline, .color = UIWidgets::Colors::Gray })) { gSaveContext.save.saveInfo.permanentSceneFlags[selectedScene].clearedRoom = UINT32_MAX; } ImGui::SameLine(); if (UIWidgets::Button("Clear##clearedRoom", - { .color = UIWidgets::Colors::Red, .size = UIWidgets::Sizes::Inline })) { + { .size = UIWidgets::Sizes::Inline, .color = UIWidgets::Colors::Red })) { gSaveContext.save.saveInfo.permanentSceneFlags[selectedScene].clearedRoom = 0; } UIWidgets::DrawFlagArray32("##clearedRoom", @@ -1959,12 +1961,12 @@ void DrawFlagsTab() { ImGui::Text("unk_14"); ImGui::SameLine(110); if (UIWidgets::Button("All##unk_14", - { .color = UIWidgets::Colors::Gray, .size = UIWidgets::Sizes::Inline })) { + { .size = UIWidgets::Sizes::Inline, .color = UIWidgets::Colors::Gray })) { gSaveContext.save.saveInfo.permanentSceneFlags[selectedScene].unk_14 = UINT32_MAX; } ImGui::SameLine(); if (UIWidgets::Button("Clear##unk_14", - { .color = UIWidgets::Colors::Red, .size = UIWidgets::Sizes::Inline })) { + { .size = UIWidgets::Sizes::Inline, .color = UIWidgets::Colors::Red })) { gSaveContext.save.saveInfo.permanentSceneFlags[selectedScene].unk_14 = 0; } UIWidgets::DrawFlagArray32("##unk_14", @@ -1975,12 +1977,12 @@ void DrawFlagsTab() { ImGui::Text("rooms"); ImGui::SameLine(110); if (UIWidgets::Button("All##rooms", - { .color = UIWidgets::Colors::Gray, .size = UIWidgets::Sizes::Inline })) { + { .size = UIWidgets::Sizes::Inline, .color = UIWidgets::Colors::Gray })) { gSaveContext.save.saveInfo.permanentSceneFlags[selectedScene].rooms = UINT32_MAX; } ImGui::SameLine(); if (UIWidgets::Button("Clear##rooms", - { .color = UIWidgets::Colors::Red, .size = UIWidgets::Sizes::Inline })) { + { .size = UIWidgets::Sizes::Inline, .color = UIWidgets::Colors::Red })) { gSaveContext.save.saveInfo.permanentSceneFlags[selectedScene].rooms = 0; } UIWidgets::DrawFlagArray32("##rooms", gSaveContext.save.saveInfo.permanentSceneFlags[selectedScene].rooms); @@ -1992,12 +1994,12 @@ void DrawFlagsTab() { ImGui::Text("chest"); ImGui::SameLine(110); if (UIWidgets::Button("All##chest", - { .color = UIWidgets::Colors::Gray, .size = UIWidgets::Sizes::Inline })) { + { .size = UIWidgets::Sizes::Inline, .color = UIWidgets::Colors::Gray })) { gSaveContext.cycleSceneFlags[selectedScene].chest = UINT32_MAX; } ImGui::SameLine(); if (UIWidgets::Button("Clear##chest", - { .color = UIWidgets::Colors::Red, .size = UIWidgets::Sizes::Inline })) { + { .size = UIWidgets::Sizes::Inline, .color = UIWidgets::Colors::Red })) { gSaveContext.cycleSceneFlags[selectedScene].chest = 0; } UIWidgets::DrawFlagArray32("##chest", gSaveContext.cycleSceneFlags[selectedScene].chest); @@ -2008,12 +2010,12 @@ void DrawFlagsTab() { ImGui::Text("switch0"); ImGui::SameLine(110); if (UIWidgets::Button("All##switch0", - { .color = UIWidgets::Colors::Gray, .size = UIWidgets::Sizes::Inline })) { + { .size = UIWidgets::Sizes::Inline, .color = UIWidgets::Colors::Gray })) { gSaveContext.cycleSceneFlags[selectedScene].switch0 = UINT32_MAX; } ImGui::SameLine(); if (UIWidgets::Button("Clear##switch0", - { .color = UIWidgets::Colors::Red, .size = UIWidgets::Sizes::Inline })) { + { .size = UIWidgets::Sizes::Inline, .color = UIWidgets::Colors::Red })) { gSaveContext.cycleSceneFlags[selectedScene].switch0 = 0; } UIWidgets::DrawFlagArray32("##switch0", gSaveContext.cycleSceneFlags[selectedScene].switch0); @@ -2023,12 +2025,12 @@ void DrawFlagsTab() { ImGui::Text("collectible"); ImGui::SameLine(110); if (UIWidgets::Button("All##collectible", - { .color = UIWidgets::Colors::Gray, .size = UIWidgets::Sizes::Inline })) { + { .size = UIWidgets::Sizes::Inline, .color = UIWidgets::Colors::Gray })) { gSaveContext.cycleSceneFlags[selectedScene].collectible = UINT32_MAX; } ImGui::SameLine(); if (UIWidgets::Button("Clear##collectible", - { .color = UIWidgets::Colors::Red, .size = UIWidgets::Sizes::Inline })) { + { .size = UIWidgets::Sizes::Inline, .color = UIWidgets::Colors::Red })) { gSaveContext.cycleSceneFlags[selectedScene].collectible = 0; } UIWidgets::DrawFlagArray32("##collectible", gSaveContext.cycleSceneFlags[selectedScene].collectible); @@ -2039,12 +2041,12 @@ void DrawFlagsTab() { ImGui::Text("switch1"); ImGui::SameLine(110); if (UIWidgets::Button("All##switch1", - { .color = UIWidgets::Colors::Gray, .size = UIWidgets::Sizes::Inline })) { + { .size = UIWidgets::Sizes::Inline, .color = UIWidgets::Colors::Gray })) { gSaveContext.cycleSceneFlags[selectedScene].switch1 = UINT32_MAX; } ImGui::SameLine(); if (UIWidgets::Button("Clear##switch1", - { .color = UIWidgets::Colors::Red, .size = UIWidgets::Sizes::Inline })) { + { .size = UIWidgets::Sizes::Inline, .color = UIWidgets::Colors::Red })) { gSaveContext.cycleSceneFlags[selectedScene].switch1 = 0; } UIWidgets::DrawFlagArray32("##switch1", gSaveContext.cycleSceneFlags[selectedScene].switch1); @@ -2054,12 +2056,12 @@ void DrawFlagsTab() { ImGui::Text("clearedRoom"); ImGui::SameLine(110); if (UIWidgets::Button("All##clearedRoom", - { .color = UIWidgets::Colors::Gray, .size = UIWidgets::Sizes::Inline })) { + { .size = UIWidgets::Sizes::Inline, .color = UIWidgets::Colors::Gray })) { gSaveContext.cycleSceneFlags[selectedScene].clearedRoom = UINT32_MAX; } ImGui::SameLine(); if (UIWidgets::Button("Clear##clearedRoom", - { .color = UIWidgets::Colors::Red, .size = UIWidgets::Sizes::Inline })) { + { .size = UIWidgets::Sizes::Inline, .color = UIWidgets::Colors::Red })) { gSaveContext.cycleSceneFlags[selectedScene].clearedRoom = 0; } UIWidgets::DrawFlagArray32("##clearedRoom", gSaveContext.cycleSceneFlags[selectedScene].clearedRoom); @@ -2127,7 +2129,8 @@ void DrawRandoTab() { UIWidgets::Checkbox((hiddenName + "obtained").c_str(), &randoSaveCheck.obtained); UIWidgets::Tooltip("Obtained"); ImGui::TableNextColumn(); - ImGui::TextColored(randoSaveCheck.obtained ? UIWidgets::Colors::LightGreen : UIWidgets::Colors::White, + ImGui::TextColored(randoSaveCheck.obtained ? UIWidgets::ColorValues.at(UIWidgets::Colors::Green) + : UIWidgets::ColorValues.at(UIWidgets::Colors::White), randoStaticCheck.name); ImGui::TableNextColumn(); UIWidgets::Combobox((hiddenName + "reward").c_str(), &randoSaveCheck.randoItemId, randoItemIdComboboxMap, |
