mirror of
https://github.com/HarbourMasters/Shipwright.git
synced 2024-12-22 08:08:53 -05:00
Add condition to disabling Generate Randomizer button if file is loaded to prevent rando context confusion. (#4487)
This commit is contained in:
parent
438a8bff79
commit
e5f4c091f8
@ -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 : "");
|
||||
|
Loading…
Reference in New Issue
Block a user