summaryrefslogtreecommitdiffstatshomepage
path: root/src/emu/ui/menu.cpp
diff options
context:
space:
mode:
author Jeffrey Clark <dude@zaplabs.com>2016-04-03 16:00:47 +0000
committer Jeffrey Clark <dude@zaplabs.com>2016-04-03 16:02:16 +0000
commit69eae891ad06d7ef220e22e163cc7469bd8416cc (patch)
tree15046803bad3131ac5c921cc066e9b390219f6b3 /src/emu/ui/menu.cpp
parent5e80a732aa7f8c6db116ec8753343f40a55034bd (diff)
submenu lang and cosmetic (nw)
Diffstat (limited to 'src/emu/ui/menu.cpp')
-rw-r--r--src/emu/ui/menu.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/emu/ui/menu.cpp b/src/emu/ui/menu.cpp
index 3655ac76bc7..bcf231724d4 100644
--- a/src/emu/ui/menu.cpp
+++ b/src/emu/ui/menu.cpp
@@ -658,8 +658,16 @@ void ui_menu::draw(bool customonly, bool noimage, bool noinput)
// if we don't have a subitem, just draw the string centered
else if (pitem.subtext == nullptr)
+ {
+ if (pitem.flags & MENU_FLAG_UI_HEADING)
+ {
+ float heading_width = machine().ui().get_string_width(itemtext);
+ container->add_line(visible_left, line_y + 0.5f * line_height, visible_left + ((visible_width - heading_width) / 2) - UI_BOX_LR_BORDER, line_y + 0.5f * line_height, UI_LINE_WIDTH, UI_BORDER_COLOR, PRIMFLAG_BLENDMODE(BLENDMODE_ALPHA));
+ container->add_line(visible_left + visible_width - ((visible_width - heading_width) / 2) + UI_BOX_LR_BORDER, line_y + 0.5f * line_height, visible_left + visible_width, line_y + 0.5f * line_height, UI_LINE_WIDTH, UI_BORDER_COLOR, PRIMFLAG_BLENDMODE(BLENDMODE_ALPHA));
+ }
machine().ui().draw_text_full(container, itemtext, effective_left, line_y, effective_width,
JUSTIFY_CENTER, WRAP_TRUNCATE, DRAW_NORMAL, fgcolor, bgcolor, nullptr, nullptr);
+ }
// otherwise, draw the item on the left and the subitem text on the right
else