Skip to content

Commit 815f33c

Browse files
authored
ui/confswitch.cpp, ui/sliders.cpp: De-emphasize default values. (#15283)
Matches the input assignment and audio effects menus.
1 parent 57ef6e7 commit 815f33c

3 files changed

Lines changed: 12 additions & 7 deletions

File tree

src/frontend/mame/ui/confswitch.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -129,6 +129,9 @@ void menu_confswitch::populate()
129129
if (field.has_next_setting())
130130
flags |= FLAG_RIGHT_ARROW;
131131

132+
if (field.live().value == field.defvalue())
133+
flags |= FLAG_DEEMPHASIZE;
134+
132135
// add the menu item
133136
item_append(field.name(), field.setting_name(), flags, &field);
134137
}

src/frontend/mame/ui/menu.cpp

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -881,13 +881,11 @@ void menu::draw(uint32_t flags)
881881

882882
// customize subitem text color
883883
if (!core_stricmp(pitem.subtext(), _("On")))
884-
fgcolor2 = rgb_t(0x00,0xff,0x00);
885-
886-
if (!core_stricmp(pitem.subtext(), _("Off")))
887-
fgcolor2 = rgb_t(0xff,0x00,0x00);
888-
889-
if (!core_stricmp(pitem.subtext(), _("Auto")))
890-
fgcolor2 = rgb_t(0xff,0xff,0x00);
884+
fgcolor2 = rgb_t(0x00, 0xff, 0x00);
885+
else if (!core_stricmp(pitem.subtext(), _("Off")))
886+
fgcolor2 = rgb_t(0xff, 0x00, 0x00);
887+
else if (!core_stricmp(pitem.subtext(), _("Auto")))
888+
fgcolor2 = rgb_t(0xff, 0xff, 0x00);
891889

892890
// draw the subitem right-justified
893891
ui().draw_text_full(

src/frontend/mame/ui/sliders.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -200,6 +200,8 @@ void menu_sliders::populate()
200200
flags |= FLAG_LEFT_ARROW;
201201
if (curval < slider->maxval)
202202
flags |= FLAG_RIGHT_ARROW;
203+
if (curval == slider->defval)
204+
flags |= FLAG_DEEMPHASIZE;
203205
item_append(slider->description, tempstring, flags, (void *)slider, menu_item_type::SLIDER);
204206
}
205207
}
@@ -225,6 +227,8 @@ void menu_sliders::populate()
225227
flags |= FLAG_LEFT_ARROW;
226228
if (curval < slider->maxval)
227229
flags |= FLAG_RIGHT_ARROW;
230+
if (curval == slider->defval)
231+
flags |= FLAG_DEEMPHASIZE;
228232
item_append(slider->description, tempstring, flags, (void *)slider, menu_item_type::SLIDER);
229233
}
230234
else

0 commit comments

Comments
 (0)