diff options
| author | Malkierian <malkierian@gmail.com> | 2025-01-23 22:01:46 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-01-24 00:01:46 -0500 |
| commit | 41ea4a601786af49062acc1c45d01f5b1559268b (patch) | |
| tree | be098ba1d9442b191e6cfd5020d772fa0d61d717 /mm/2s2h/DeveloperTools/SaveEditor.cpp | |
| parent | 8caeb4b66891bd46b4c3a957fa7b8468584c03d5 (diff) | |
Modern menu v2 (#948)
* Axe `SearchableMenuItems.h`, moving things to `Menu.cpp` or `Menu.h` as necessary.
Add `MenuTypes.h` for enums, structs, etc, for easy inclusion.
Change `BenMenu` to `Menu`, and move to `Ship::` namespace rather than `BenGui::`.
* Implement `BenMenu` extension of `Menu`, moving all port-specific code to `BenMenu`.
`MenuTypes.h` and `Menu.h` should now be safe to include in multiple places.
Window backend dropdown removed from menubar (maybe temporarily?).
* Convert widgetInfo and widget draws to utilize UIWidgets Options structs.
* Clean up default widget options.
Add more colors, and add some of them to the menu theme dropdown.
Convert widget options to use new Color enum instead of storing `ImVec4`s internally.
* Fix a couple options type mismatches.
Group option types together in the header.
* Create `AddWidget` widget builder for dev experience clarity.
Convert all existing widgets to the builder flow.
* Unify search results displays.
Restore tooltip functionality.
* Rename `widgetInfo` to `WidgetInfo`.
* WidgetOptions base struct implemented, shared_ptr stored on WidgetInfo.
Move tooltip to WidgetOptions.
WidgetOptions and derived structs now implement the builder flow.
Rename UIWidgets::Color to Colors, Colors to ColorValues.
Re-enable all menu widgets.
* Fully nix the menubar entries.
Add new menubar entry to explain that the settings are in the new menu and give hotkey to open it.
* Address reviews.
Tweak colors.
Add WrappedText to Checkboxes as test case.
* Implement function to add MainMenuEntry remotely.
Implement widget with custom draw function calling.
Partially implement Advanced Resolution, using external widget registration and custom widget functionality.
Add some AR CVars to disableMap for use with IR slider.
* clang
* More reviews, comment AR stuff to keep it from displaying in the menu for now.
* Better header define formatting.
Change FloatSliderOptions builder arguments from int32 to float.
* Fix default menu theme references.
Harden sidebar search insertion and removal against index out of bounds issues.
* Change top search clear to trigger on header or sidebar change regardless of autofocus option.
* Change top bar search background to 20% opacity of menu theme color to increase visibility.
* Fix all unthemed widget default colors.
Missed menu theme CVar change.
* :squint:
* *raises hands as though holding a ball* Colors
---------
Co-authored-by: Garrett Cox <garrettjcox@gmail.com>
Diffstat (limited to 'mm/2s2h/DeveloperTools/SaveEditor.cpp')
| -rw-r--r-- | mm/2s2h/DeveloperTools/SaveEditor.cpp | 148 |
1 files changed, 75 insertions, 73 deletions
diff --git a/mm/2s2h/DeveloperTools/SaveEditor.cpp b/mm/2s2h/DeveloperTools/SaveEditor.cpp index dcef87ac5..9233efeb3 100644 --- a/mm/2s2h/DeveloperTools/SaveEditor.cpp +++ b/mm/2s2h/DeveloperTools/SaveEditor.cpp @@ -53,12 +53,14 @@ constexpr u8 WALLET_LEVEL_MAX = 2; ImVec4 colorTint; const char* songTooltip; const char* curForm; -ImVec4 formColor; +UIWidgets::Colors formColor; uint32_t formObject; 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]); @@ -239,7 +241,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 { @@ -265,7 +267,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 { @@ -294,7 +296,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); @@ -321,8 +323,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 { @@ -382,7 +385,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; @@ -390,7 +393,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; @@ -426,7 +429,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) { @@ -468,7 +472,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; @@ -477,7 +481,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; @@ -524,13 +528,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); } @@ -1010,7 +1014,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); @@ -1028,7 +1032,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); @@ -1252,12 +1256,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: @@ -1267,7 +1271,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: @@ -1370,7 +1374,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++) { @@ -1529,10 +1533,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; } } @@ -1551,12 +1553,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]); @@ -1567,12 +1569,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]); @@ -1582,12 +1584,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]); @@ -1598,12 +1600,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]); @@ -1613,12 +1615,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); @@ -1629,12 +1631,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); @@ -1644,12 +1646,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); @@ -1660,12 +1662,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]); @@ -1675,12 +1677,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]); @@ -1691,12 +1693,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]); @@ -1706,12 +1708,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]); @@ -1737,14 +1739,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; } @@ -1757,12 +1759,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", @@ -1774,12 +1776,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); @@ -1790,12 +1792,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", @@ -1806,12 +1808,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", @@ -1823,12 +1825,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", @@ -1839,12 +1841,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", @@ -1856,12 +1858,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", @@ -1872,12 +1874,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); @@ -1889,12 +1891,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); @@ -1905,12 +1907,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); @@ -1920,12 +1922,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); @@ -1936,12 +1938,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); @@ -1951,12 +1953,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); |
