mirror of
https://github.com/holub/mame
synced 2025-10-05 08:41:31 +03:00
cleanup. (nw)
This commit is contained in:
parent
526d56d359
commit
c890643fd5
@ -537,6 +537,8 @@ void ui_menu::draw(bool customonly, bool noimage, bool noinput)
|
||||
machine().ui().draw_outlined_box(container, x1, y1, x2, y2, UI_BACKGROUND_COLOR);
|
||||
|
||||
// determine the first visible line based on the current selection
|
||||
if (selected > top_line + visible_lines)
|
||||
top_line = selected - (visible_lines / 2);
|
||||
if (top_line < 0 || selected == 0)
|
||||
top_line = 0;
|
||||
if (top_line + visible_lines >= item.size())
|
||||
|
@ -2773,7 +2773,7 @@ rgb_t decode_ui_color(int id, running_machine *machine)
|
||||
|
||||
if (machine != nullptr) {
|
||||
ui_options option;
|
||||
for (int x = 0; x < ARRAY_LENGTH(s_color_list); x++) {
|
||||
for (int x = 0; x < ARRAY_LENGTH(s_color_list); ++x) {
|
||||
const char *o_default = option.value(s_color_list[x]);
|
||||
const char *s_option = machine->ui().options().value(s_color_list[x]);
|
||||
int len = strlen(s_option);
|
||||
|
@ -226,5 +226,5 @@ private:
|
||||
FUNCTION PROTOTYPES
|
||||
***************************************************************************/
|
||||
rgb_t decode_ui_color(int id, running_machine *machine = nullptr);
|
||||
int get_font_rows(running_machine *machine = NULL);
|
||||
int get_font_rows(running_machine *machine = nullptr);
|
||||
#endif /* __USRINTRF_H__ */
|
||||
|
Loading…
Reference in New Issue
Block a user