mirror of
https://github.com/HarbourMasters/Shipwright.git
synced 2025-04-28 13:17:58 +03:00
Fix some misc. Rando menu issues (#5272)
* Fix issue where random and clear seed buttons overlap text input. * Fix issue where item scale is incorrectly disabled. On fresh json, there was a mismatch on the defaults where SGIA_JUNK was default for the actual combobx but SGIA_DISABLED, was used as the default when the CVar was checked in the scale slider's PreFunc.
This commit is contained in:
parent
2bde8fbe5d
commit
17b91ecc2d
2 changed files with 7 additions and 7 deletions
|
@ -2710,12 +2710,7 @@ void RandomizerSettingsWindow::DrawElement() {
|
||||||
"Characters from a-z, A-Z, and 0-9 are supported.\n"
|
"Characters from a-z, A-Z, and 0-9 are supported.\n"
|
||||||
"Character limit is 1023, after which the seed will be truncated.\n"
|
"Character limit is 1023, after which the seed will be truncated.\n"
|
||||||
);
|
);
|
||||||
if (strnlen(seedString, MAX_SEED_STRING_SIZE) == 0) {
|
ImGui::SameLine();
|
||||||
ImGui::SameLine(17.0f);
|
|
||||||
ImGui::TextColored(ImVec4(1.0f, 1.0f, 1.0f, 0.4f), "Leave blank for random seed");
|
|
||||||
}
|
|
||||||
UIWidgets::PopStyleInput();
|
|
||||||
ImGui::SameLine(0.f, 50.f);
|
|
||||||
if (UIWidgets::Button(ICON_FA_RANDOM, UIWidgets::ButtonOptions().Size(UIWidgets::Sizes::Inline).Color(THEME_COLOR).Padding(ImVec2(10.f, 6.f)).Tooltip(
|
if (UIWidgets::Button(ICON_FA_RANDOM, UIWidgets::ButtonOptions().Size(UIWidgets::Sizes::Inline).Color(THEME_COLOR).Padding(ImVec2(10.f, 6.f)).Tooltip(
|
||||||
"Creates a new random seed value to be used when generating a randomizer"
|
"Creates a new random seed value to be used when generating a randomizer"
|
||||||
))) {
|
))) {
|
||||||
|
@ -2725,6 +2720,11 @@ void RandomizerSettingsWindow::DrawElement() {
|
||||||
if (UIWidgets::Button(ICON_FA_ERASER, UIWidgets::ButtonOptions().Size(UIWidgets::Sizes::Inline).Color(THEME_COLOR).Padding(ImVec2(10.f, 6.f)))) {
|
if (UIWidgets::Button(ICON_FA_ERASER, UIWidgets::ButtonOptions().Size(UIWidgets::Sizes::Inline).Color(THEME_COLOR).Padding(ImVec2(10.f, 6.f)))) {
|
||||||
memset(seedString, 0, MAX_SEED_STRING_SIZE);
|
memset(seedString, 0, MAX_SEED_STRING_SIZE);
|
||||||
}
|
}
|
||||||
|
if (strnlen(seedString, MAX_SEED_STRING_SIZE) == 0) {
|
||||||
|
ImGui::SameLine(17.0f);
|
||||||
|
ImGui::TextColored(ImVec4(1.0f, 1.0f, 1.0f, 0.4f), "Leave blank for random seed");
|
||||||
|
}
|
||||||
|
UIWidgets::PopStyleInput();
|
||||||
}
|
}
|
||||||
|
|
||||||
UIWidgets::Spacer(0);
|
UIWidgets::Spacer(0);
|
||||||
|
|
|
@ -79,7 +79,7 @@ void SohMenu::AddMenuRandomizer() {
|
||||||
.CVar(CVAR_RANDOMIZER_ENHANCEMENT("TimeSavers.SkipGetItemAnimationScale"))
|
.CVar(CVAR_RANDOMIZER_ENHANCEMENT("TimeSavers.SkipGetItemAnimationScale"))
|
||||||
.PreFunc([](WidgetInfo& info) {
|
.PreFunc([](WidgetInfo& info) {
|
||||||
info.options->disabled =
|
info.options->disabled =
|
||||||
!CVarGetInteger(CVAR_RANDOMIZER_ENHANCEMENT("TimeSavers.SkipGetItemAnimation"), SGIA_DISABLED);
|
!CVarGetInteger(CVAR_RANDOMIZER_ENHANCEMENT("TimeSavers.SkipGetItemAnimation"), SGIA_JUNK);
|
||||||
info.options->disabledTooltip = "This slider only applies when using the \"Skip Get Item Animations\" option.";
|
info.options->disabledTooltip = "This slider only applies when using the \"Skip Get Item Animations\" option.";
|
||||||
})
|
})
|
||||||
.Options(FloatSliderOptions()
|
.Options(FloatSliderOptions()
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue