From 7d41a1f619f0e03eeaf7acc2edde6c2671779e03 Mon Sep 17 00:00:00 2001 From: AJR Date: Sun, 23 Oct 2016 00:22:00 +0200 Subject: Improvements to rgb_t (nw) - Make most class methods constexpr - Make color constants (white, black, etc.) into constexpr factory methods, in order to fix a static initialization problem discussed on the MAMEWorld forums. (Note that while C++14 allows constexpr member variables to be initialized outside classes, current compilers' support for C++14 constexpr rules has proven to be lamentably deficient.) - Create bitmap_rgb32::erase to simplify syntax in update handlers --- src/frontend/mame/ui/submenu.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/frontend/mame/ui/submenu.cpp') diff --git a/src/frontend/mame/ui/submenu.cpp b/src/frontend/mame/ui/submenu.cpp index 1467a0e2921..d54724997fe 100644 --- a/src/frontend/mame/ui/submenu.cpp +++ b/src/frontend/mame/ui/submenu.cpp @@ -426,7 +426,7 @@ void submenu::custom_render(void *selectedref, float top, float bottom, float or float width; ui().draw_text_full(container(), _(m_options[0].description), 0.0f, 0.0f, 1.0f, ui::text_layout::CENTER, ui::text_layout::TRUNCATE, - mame_ui_manager::NONE, rgb_t::white, rgb_t::black, &width, nullptr); + mame_ui_manager::NONE, rgb_t::white(), rgb_t::black(), &width, nullptr); width += 2 * UI_BOX_LR_BORDER; float maxwidth = std::max(origx2 - origx1, width); @@ -454,7 +454,7 @@ void submenu::custom_render(void *selectedref, float top, float bottom, float or if (selected_sm_option.entry != nullptr) { ui().draw_text_full(container(), selected_sm_option.entry->description(), 0.0f, 0.0f, 1.0f, ui::text_layout::CENTER, ui::text_layout::TRUNCATE, - mame_ui_manager::NONE, rgb_t::white, rgb_t::black, &width, nullptr); + mame_ui_manager::NONE, rgb_t::white(), rgb_t::black(), &width, nullptr); width += 2 * UI_BOX_LR_BORDER; maxwidth = std::max(origx2 - origx1, width); -- cgit v1.2.3-70-g09d2