cleanup. (nw)

This commit is contained in:
dankan1890 2016-02-21 05:03:06 +01:00
parent 526d56d359
commit c890643fd5
3 changed files with 4 additions and 2 deletions

View File

@ -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())

View File

@ -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);

View File

@ -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__ */