mirror of
https://github.com/HarbourMasters/Shipwright.git
synced 2025-08-22 06:13:45 -07:00
Apply RandoGenerating lockout to rando preset Apply button.
This commit is contained in:
parent
78e7061247
commit
4987dd7fd0
2 changed files with 6 additions and 4 deletions
|
@ -146,7 +146,9 @@ void DrawPresetSelector(std::vector<PresetSection> includeSections, std::string
|
||||||
// UIWidgets::Tooltip(comboboxTooltip.c_str());
|
// UIWidgets::Tooltip(comboboxTooltip.c_str());
|
||||||
|
|
||||||
UIWidgets::PushStyleButton(THEME_COLOR);
|
UIWidgets::PushStyleButton(THEME_COLOR);
|
||||||
if (ImGui::Button(("Apply Preset##" + selectorCvar).c_str())) {
|
if (UIWidgets::Button(
|
||||||
|
("Apply Preset##" + selectorCvar).c_str(),
|
||||||
|
UIWidgets::ButtonOptions({ { .disabled = disabled } }).Color(THEME_COLOR).Size(UIWidgets::Sizes::Inline))) {
|
||||||
applyPreset(currentIndex, includeSections);
|
applyPreset(currentIndex, includeSections);
|
||||||
}
|
}
|
||||||
UIWidgets::PopStyleButton();
|
UIWidgets::PopStyleButton();
|
||||||
|
|
|
@ -3653,10 +3653,10 @@ void RandomizerSettingsWindow::DrawElement() {
|
||||||
generated = 0;
|
generated = 0;
|
||||||
randoThread.join();
|
randoThread.join();
|
||||||
}
|
}
|
||||||
bool disableEditingRandoSettings =
|
bool generating = CVarGetInteger(CVAR_GENERAL("RandoGenerating"), 0);
|
||||||
CVarGetInteger(CVAR_GENERAL("RandoGenerating"), 0) || CVarGetInteger(CVAR_GENERAL("OnFileSelectNameEntry"), 0);
|
bool disableEditingRandoSettings = generating || CVarGetInteger(CVAR_GENERAL("OnFileSelectNameEntry"), 0);
|
||||||
|
|
||||||
DrawPresetSelector({ PRESET_SECTION_RANDOMIZER }, "Randomizer", disableEditingRandoSettings);
|
DrawPresetSelector({ PRESET_SECTION_RANDOMIZER }, "Randomizer", generating);
|
||||||
|
|
||||||
// UIWidgets::Spacer(0);
|
// UIWidgets::Spacer(0);
|
||||||
UIWidgets::CVarCheckbox("Manual seed entry", CVAR_RANDOMIZER_SETTING("ManualSeedEntry"),
|
UIWidgets::CVarCheckbox("Manual seed entry", CVAR_RANDOMIZER_SETTING("ManualSeedEntry"),
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue