Change: Draw boolean toggle as a slider widget.

This improves usability as the slider position indicates the state instead of a red/green colour change.
This commit is contained in:
Peter Nelson
2025-04-20 20:36:28 +01:00
committed by Peter Nelson
parent e3858e81dc
commit e3d2d68bd4
7 changed files with 16 additions and 11 deletions

View File

@@ -293,7 +293,7 @@ void SettingEntry::DrawSetting(GameSettings *settings_ptr, int left, int right,
int32_t value = sd->Read(ResolveObject(settings_ptr, sd));
if (sd->IsBoolSetting()) {
/* Draw checkbox for boolean-value either on/off */
DrawBoolButton(buttons_left, button_y, value != 0, editable);
DrawBoolButton(buttons_left, button_y, COLOUR_YELLOW, COLOUR_MAUVE, value != 0, editable);
} else if (sd->flags.Test(SettingFlag::GuiDropdown)) {
/* Draw [v] button for settings of an enum-type */
DrawDropDownButton(buttons_left, button_y, COLOUR_YELLOW, state != 0, editable);