From e5f4c091f8ae666dd6e304d37a5564c161af4aba Mon Sep 17 00:00:00 2001 From: Malkierian Date: Sun, 27 Oct 2024 14:40:30 -0700 Subject: [PATCH] Add condition to disabling Generate Randomizer button if file is loaded to prevent rando context confusion. (#4487) --- soh/soh/Enhancements/randomizer/randomizer.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/soh/soh/Enhancements/randomizer/randomizer.cpp b/soh/soh/Enhancements/randomizer/randomizer.cpp index c99a43dfb..e4f5e6798 100644 --- a/soh/soh/Enhancements/randomizer/randomizer.cpp +++ b/soh/soh/Enhancements/randomizer/randomizer.cpp @@ -1393,7 +1393,8 @@ void RandomizerSettingsWindow::DrawElement() { } UIWidgets::Spacer(0); - ImGui::BeginDisabled(CVarGetInteger(CVAR_RANDOMIZER_SETTING("DontGenerateSpoiler"), 0) && gSaveContext.gameMode != GAMEMODE_FILE_SELECT); + ImGui::BeginDisabled((CVarGetInteger(CVAR_RANDOMIZER_SETTING("DontGenerateSpoiler"), 0) && gSaveContext.gameMode != GAMEMODE_FILE_SELECT) || + GameInteractor::IsSaveLoaded()); if (ImGui::Button("Generate Randomizer")) { ctx->SetSpoilerLoaded(false); GenerateRandomizer(CVarGetInteger(CVAR_RANDOMIZER_SETTING("ManualSeedEntry"), 0) ? seedString : "");