diff options
author | 2016-04-03 18:25:59 +0200 | |
---|---|---|
committer | 2016-04-03 18:25:59 +0200 | |
commit | 91f12fe7962fc7bd8307dc70b1388dd92d109499 (patch) | |
tree | 593337a2c99fe4b36ed2d9332a3ecf383972d79f /src/emu/ui/menu.cpp | |
parent | 74f95ba03e58dc12569c22c5ba5d292833abfca5 (diff) | |
parent | 69eae891ad06d7ef220e22e163cc7469bd8416cc (diff) |
Merge pull request #783 from h0tw1r3/feature-extmenu
submenu lang and cosmetic (nw)
Diffstat (limited to 'src/emu/ui/menu.cpp')
-rw-r--r-- | src/emu/ui/menu.cpp | 8 |
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 |