diff options
author | 2019-06-28 17:30:09 -0400 | |
---|---|---|
committer | 2019-06-28 17:30:09 -0400 | |
commit | 697ff7bd7149d635a838543b65409dd42d739087 (patch) | |
tree | 23d49d81fd2b87ed565fac5c758b73b678fa7ad2 /src/frontend/mame/ui/filesel.cpp | |
parent | cec557538d0d55b11780e83ac60e0fef68b37e0d (diff) |
Changed the various usages of UI_*COLOR to be calls to src/frontend/mame/ui/moptions.h (#5282)
* Changed the various usages of UI_*COLOR to be calls to
src/frontend/mame/ui/moptions.h
The various UI_*COLOR macros were implemented as calls to
decode_ui_color, which cached the values for the various options in a
static array, which was obviously a gross hack.
This refactoring is strategic because I am trying to confine awareness
of mame_ui_manager to code in src/frontend/mame/ui, and the
implementation of decode_ui_color() relied on the ability to access
mame_ui_manager as a singleton from outside this code.
* Created a ui_colors object, so that queries for UI RGB values would not
always require parsing strings
* Converted a few more options().zyx_color() to colors().zyx_color()
* A few more misses from earlier
Diffstat (limited to 'src/frontend/mame/ui/filesel.cpp')
-rw-r--r-- | src/frontend/mame/ui/filesel.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/frontend/mame/ui/filesel.cpp b/src/frontend/mame/ui/filesel.cpp index 3907f007517..d9a6755bf74 100644 --- a/src/frontend/mame/ui/filesel.cpp +++ b/src/frontend/mame/ui/filesel.cpp @@ -83,7 +83,7 @@ void menu_file_selector::custom_render(void *selectedref, float top, float botto extra_text_position(origx1, origx2, origy1, top, layout, -1, x1, y1, x2, y2); // draw a box - ui().draw_outlined_box(container(), x1, y1, x2, y2, UI_BACKGROUND_COLOR); + ui().draw_outlined_box(container(), x1, y1, x2, y2, ui().colors().background_color()); // take off the borders x1 += UI_BOX_LR_BORDER; @@ -100,8 +100,8 @@ void menu_file_selector::custom_render(void *selectedref, float top, float botto m_hover_directory = m_current_directory.substr(0, target_dir_end + strlen(PATH_SEPARATOR)); // highlight the text in question - rgb_t fgcolor = UI_MOUSEOVER_COLOR; - rgb_t bgcolor = UI_MOUSEOVER_BG_COLOR; + rgb_t fgcolor = ui().colors().mouseover_color(); + rgb_t bgcolor = ui().colors().mouseover_bg_color(); layout.restyle(target_dir_start, target_dir_end - target_dir_start, &fgcolor, &bgcolor); } else |