diff --git a/soh/assets/custom/presets/Main Vanilla+.json b/soh/assets/custom/presets/Enhancements - Curated First Time Vanilla.json similarity index 96% rename from soh/assets/custom/presets/Main Vanilla+.json rename to soh/assets/custom/presets/Enhancements - Curated First Time Vanilla.json index 1ac97a567..3b483d5ce 100644 --- a/soh/assets/custom/presets/Main Vanilla+.json +++ b/soh/assets/custom/presets/Enhancements - Curated First Time Vanilla.json @@ -52,6 +52,6 @@ "gRandoEnhancements": null } }, - "presetName": "Main Vanilla+", + "presetName": "Enhancements - Curated First Time Vanilla", "isBuiltIn": true } \ No newline at end of file diff --git a/soh/assets/custom/presets/Main Randomizer.json b/soh/assets/custom/presets/Enhancements - Curated Randomizer.json similarity index 98% rename from soh/assets/custom/presets/Main Randomizer.json rename to soh/assets/custom/presets/Enhancements - Curated Randomizer.json index 2982a8b72..069d85c90 100644 --- a/soh/assets/custom/presets/Main Randomizer.json +++ b/soh/assets/custom/presets/Enhancements - Curated Randomizer.json @@ -132,6 +132,6 @@ "gRandoEnhancements": null } }, - "presetName": "Main Randomizer", + "presetName": "Enhancements - Curated Randomizer", "isBuiltIn": true } \ No newline at end of file diff --git a/soh/assets/custom/presets/Main Enhanced.json b/soh/assets/custom/presets/Enhancements - Curated Returning Vanilla.json similarity index 97% rename from soh/assets/custom/presets/Main Enhanced.json rename to soh/assets/custom/presets/Enhancements - Curated Returning Vanilla.json index eabda809f..8a00f87f3 100644 --- a/soh/assets/custom/presets/Main Enhanced.json +++ b/soh/assets/custom/presets/Enhancements - Curated Returning Vanilla.json @@ -55,6 +55,6 @@ "gRandoEnhancements": null } }, - "presetName": "Main Enhanced", + "presetName": "Enhancements - Curated Returning Vanilla", "isBuiltIn": true } \ No newline at end of file diff --git a/soh/assets/custom/presets/Main Default.json b/soh/assets/custom/presets/Enhancements - Reset to Default.json similarity index 77% rename from soh/assets/custom/presets/Main Default.json rename to soh/assets/custom/presets/Enhancements - Reset to Default.json index 7d87c3d95..c41f72961 100644 --- a/soh/assets/custom/presets/Main Default.json +++ b/soh/assets/custom/presets/Enhancements - Reset to Default.json @@ -6,6 +6,6 @@ "gRandoEnhancements": null } }, - "presetName": "Main Default", + "presetName": "Enhancements - Reset to Default", "isBuiltIn": true } \ No newline at end of file diff --git a/soh/assets/custom/presets/Rando Advanced.json b/soh/assets/custom/presets/Rando Seed Settings - Advanced.json similarity index 97% rename from soh/assets/custom/presets/Rando Advanced.json rename to soh/assets/custom/presets/Rando Seed Settings - Advanced.json index 4042c0688..f8fb2b9d1 100644 --- a/soh/assets/custom/presets/Rando Advanced.json +++ b/soh/assets/custom/presets/Rando Seed Settings - Advanced.json @@ -64,6 +64,6 @@ } } }, - "presetName": "Rando Advanced", + "presetName": "Rando Seed Settings - Advanced", "isBuiltIn": true } \ No newline at end of file diff --git a/soh/assets/custom/presets/Rando Beginner.json b/soh/assets/custom/presets/Rando Seed Settings - Beginner.json similarity index 96% rename from soh/assets/custom/presets/Rando Beginner.json rename to soh/assets/custom/presets/Rando Seed Settings - Beginner.json index 595734fe0..be4c18567 100644 --- a/soh/assets/custom/presets/Rando Beginner.json +++ b/soh/assets/custom/presets/Rando Seed Settings - Beginner.json @@ -46,6 +46,6 @@ } } }, - "presetName": "Rando Beginner", + "presetName": "Rando Seed Settings - Beginner", "isBuiltIn": true } \ No newline at end of file diff --git a/soh/assets/custom/presets/Rando Hell Mode.json b/soh/assets/custom/presets/Rando Seed Settings - Hell Mode.json similarity index 98% rename from soh/assets/custom/presets/Rando Hell Mode.json rename to soh/assets/custom/presets/Rando Seed Settings - Hell Mode.json index cdcceb451..5e0d7e586 100644 --- a/soh/assets/custom/presets/Rando Hell Mode.json +++ b/soh/assets/custom/presets/Rando Seed Settings - Hell Mode.json @@ -78,6 +78,6 @@ } } }, - "presetName": "Rando Hell Mode", + "presetName": "Rando Seed Settings - Hell Mode", "isBuiltIn": true } \ No newline at end of file diff --git a/soh/assets/custom/presets/Rando Default.json b/soh/assets/custom/presets/Rando Seed Settings - Reset to Default.json similarity index 64% rename from soh/assets/custom/presets/Rando Default.json rename to soh/assets/custom/presets/Rando Seed Settings - Reset to Default.json index f5c5818e9..b87323821 100644 --- a/soh/assets/custom/presets/Rando Default.json +++ b/soh/assets/custom/presets/Rando Seed Settings - Reset to Default.json @@ -4,6 +4,6 @@ "gRandoSettings": null } }, - "presetName": "Rando Default", + "presetName": "Rando Seed Settings - Reset to Default", "isBuiltIn": true } \ No newline at end of file diff --git a/soh/assets/custom/presets/Rando Standard.json b/soh/assets/custom/presets/Rando Seed Settings - Standard.json similarity index 97% rename from soh/assets/custom/presets/Rando Standard.json rename to soh/assets/custom/presets/Rando Seed Settings - Standard.json index ad91912de..b89a36abc 100644 --- a/soh/assets/custom/presets/Rando Standard.json +++ b/soh/assets/custom/presets/Rando Seed Settings - Standard.json @@ -58,6 +58,6 @@ } } }, - "presetName": "Rando Standard", + "presetName": "Rando Seed Settings - Standard", "isBuiltIn": true } \ No newline at end of file diff --git a/soh/soh/Enhancements/FileSelectEnhancements.cpp b/soh/soh/Enhancements/FileSelectEnhancements.cpp index 82bb784d8..e25c5bd53 100644 --- a/soh/soh/Enhancements/FileSelectEnhancements.cpp +++ b/soh/soh/Enhancements/FileSelectEnhancements.cpp @@ -1,6 +1,8 @@ #include "FileSelectEnhancements.h" #include "soh/OTRGlobals.h" +#include "soh/SohGui/SohModals.h" +#include "soh/SohGui/SohGui.hpp" #include #include @@ -137,4 +139,37 @@ const char* SohFileSelect_GetRandomizerSettingText(uint8_t optionIndex, uint8_t const char* SohFileSelect_GetArchipelagoSettingText(uint8_t optionIndex, uint8_t language) { return ArchipelagoSettingsMenuText[optionIndex][language].c_str(); -} \ No newline at end of file +} + +void SohFileSelect_ShowPresetMenu() { + SohGui::ShowEscMenu(); + CVarSetString(CVAR_SETTING("Menu.ActiveHeader"), "Settings"); + CVarSetString(CVAR_SETTING("Menu.SettingsSidebarSection"), "Presets"); + CVarSetInteger(CVAR_SETTING("Menu.HasSeenPresetModal"), 1); +} + +void SohFileSelect_DismissPresetModal() { + CVarSetInteger(CVAR_SETTING("Menu.HasSeenPresetModal"), 1); +} + +void SohFileSelect_ShowPresetModal() { + if (CVarGetInteger(CVAR_SETTING("Menu.HasSeenPresetModal"), 0)) { + return; + } + std::shared_ptr modal = static_pointer_cast( + Ship::Context::GetInstance()->GetWindow()->GetGui()->GetGuiWindow("Modal Window")); + if (modal->IsPopupOpen("Take a look at our presets!")) { + modal->DismissPopup(); + } else { + modal->RegisterPopup("Take a look at our presets!", + "\nHey there! Ship comes with a ton of options, but none of them are on by default,\n" + "even in randomizer. If you haven't already, we highly recommend applying the\n" + "\"Enhancements - Curated Randomizer\" preset for a great, curated out of the\n" + "box rando experience.\n" + "\n" + "Afterwards, consider taking a look at the rest of the ESC menu to further tweak \n" + "the experience to your liking!\n ", + "Cool, show me the presets!", "Got it, just let me play!", SohFileSelect_ShowPresetMenu, + SohFileSelect_DismissPresetModal); + } +} diff --git a/soh/soh/Enhancements/FileSelectEnhancements.h b/soh/soh/Enhancements/FileSelectEnhancements.h index b76f728e7..6083e67b0 100644 --- a/soh/soh/Enhancements/FileSelectEnhancements.h +++ b/soh/soh/Enhancements/FileSelectEnhancements.h @@ -8,6 +8,8 @@ extern "C" { #endif const char* SohFileSelect_GetRandomizerSettingText(u8 optionIndex, u8 language); const char* SohFileSelect_GetArchipelagoSettingText(u8 optionIndex, u8 language); +const char* SohFileSelect_GetSettingText(u8 optionIndex, u8 language); +void SohFileSelect_ShowPresetModal(); #ifdef __cplusplus }; #endif diff --git a/soh/soh/Enhancements/Presets/Presets.cpp b/soh/soh/Enhancements/Presets/Presets.cpp index 058d5a2cd..0641eb22c 100644 --- a/soh/soh/Enhancements/Presets/Presets.cpp +++ b/soh/soh/Enhancements/Presets/Presets.cpp @@ -341,7 +341,7 @@ void DrawNewPresetPopup() { } void PresetsCustomWidget(WidgetInfo& info) { - ImGui::PushFont(OTRGlobals::Instance->fontMonoLargest); + ImGui::PushFont(OTRGlobals::Instance->fontMonoLarger); if (UIWidgets::Button("New Preset", UIWidgets::ButtonOptions( { { .disabled = (CVarGetInteger(CVAR_SETTING("DisableChanges"), 0) != 0), .disabledTooltip = "Disabled because of race lockout" } }) @@ -360,7 +360,7 @@ void PresetsCustomWidget(WidgetInfo& info) { bool hideBuiltIn = CVarGetInteger(CVAR_GENERAL("HideBuiltInPresets"), 0); UIWidgets::PushStyleTabs(THEME_COLOR); if (ImGui::BeginTable("PresetWidgetTable", PRESET_SECTION_MAX + 3)) { - ImGui::TableSetupColumn("Name", ImGuiTableColumnFlags_WidthFixed, 250); + ImGui::TableSetupColumn("Name", ImGuiTableColumnFlags_WidthFixed, 400); for (int i = PRESET_SECTION_SETTINGS; i < PRESET_SECTION_MAX; i++) { ImGui::TableSetupColumn(blockInfo[i].names[0].c_str()); } diff --git a/soh/soh/SohGui/SohGui.cpp b/soh/soh/SohGui/SohGui.cpp index 9f7c80aac..374856fc3 100644 --- a/soh/soh/SohGui/SohGui.cpp +++ b/soh/soh/SohGui/SohGui.cpp @@ -265,4 +265,8 @@ void ShowRandomizerSettingsMenu() { void ShowArchipelagoSettingsMenu() { mArchipelagoSettingsWindow->Show(); } + +void ShowEscMenu() { + mSohMenu->Show(); +} } // namespace SohGui diff --git a/soh/soh/SohGui/SohGui.hpp b/soh/soh/SohGui/SohGui.hpp index 9e78ebf77..77505e922 100644 --- a/soh/soh/SohGui/SohGui.hpp +++ b/soh/soh/SohGui/SohGui.hpp @@ -41,6 +41,7 @@ void RegisterPopup(std::string title, std::string message, std::string button1 = std::function button1callback = nullptr, std::function button2callback = nullptr); void ShowRandomizerSettingsMenu(); void ShowArchipelagoSettingsMenu(); +void ShowEscMenu(); UIWidgets::Colors GetMenuThemeColor(); } // namespace SohGui diff --git a/soh/src/overlays/gamestates/ovl_file_choose/z_file_choose.c b/soh/src/overlays/gamestates/ovl_file_choose/z_file_choose.c index 717988755..cfbf10929 100644 --- a/soh/src/overlays/gamestates/ovl_file_choose/z_file_choose.c +++ b/soh/src/overlays/gamestates/ovl_file_choose/z_file_choose.c @@ -1455,6 +1455,7 @@ void FileChoose_UpdateRandomizerMenu(GameState* thisx) { if (CHECK_BTN_ALL(input->press.button, BTN_A)) { if (this->randomizerIndex == RSM_START_RANDOMIZER) { if (Randomizer_IsSeedGenerated() || Randomizer_IsSpoilerLoaded()) { + SohFileSelect_ShowPresetModal(); Audio_PlaySoundGeneral(NA_SE_SY_FSEL_DECIDE_L, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb); static u8 emptyName[] = { 0x3E, 0x3E, 0x3E, 0x3E, 0x3E, 0x3E, 0x3E, 0x3E };