Add tooltip to Generate Seed button when disabled indicating the need to be on File Select. (#5509)
This commit is contained in:
@@ -3724,13 +3724,15 @@ void RandomizerSettingsWindow::DrawElement() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
UIWidgets::Spacer(0);
|
UIWidgets::Spacer(0);
|
||||||
ImGui::BeginDisabled((gSaveContext.gameMode != GAMEMODE_FILE_SELECT) || GameInteractor::IsSaveLoaded());
|
UIWidgets::ButtonOptions options = UIWidgets::ButtonOptions().Size(ImVec2(250.f, 0.f)).Color(THEME_COLOR);
|
||||||
if (UIWidgets::Button("Generate Randomizer",
|
options.Disabled((gSaveContext.gameMode != GAMEMODE_FILE_SELECT) || GameInteractor::IsSaveLoaded());
|
||||||
UIWidgets::ButtonOptions().Size(ImVec2(250.f, 0.f)).Color(THEME_COLOR))) {
|
if (options.disabled) {
|
||||||
|
options.DisabledTooltip("Must be on File Select to generate a randomizer seed.");
|
||||||
|
}
|
||||||
|
if (UIWidgets::Button("Generate Randomizer", options)) {
|
||||||
ctx->SetSpoilerLoaded(false);
|
ctx->SetSpoilerLoaded(false);
|
||||||
GenerateRandomizer(CVarGetInteger(CVAR_RANDOMIZER_SETTING("ManualSeedEntry"), 0) ? seedString : "");
|
GenerateRandomizer(CVarGetInteger(CVAR_RANDOMIZER_SETTING("ManualSeedEntry"), 0) ? seedString : "");
|
||||||
}
|
}
|
||||||
ImGui::EndDisabled();
|
|
||||||
|
|
||||||
ImGui::SameLine();
|
ImGui::SameLine();
|
||||||
if (!CVarGetInteger(CVAR_RANDOMIZER_SETTING("DontGenerateSpoiler"), 0)) {
|
if (!CVarGetInteger(CVAR_RANDOMIZER_SETTING("DontGenerateSpoiler"), 0)) {
|
||||||
|
|||||||
Reference in New Issue
Block a user