mirror of
https://github.com/holub/mame
synced 2025-04-21 16:01:56 +03:00
Fixed MT06263
This commit is contained in:
parent
ad47988e79
commit
eeadf6d71c
@ -145,7 +145,7 @@ void menu_cheat::populate()
|
||||
UINT32 flags;
|
||||
curcheat->menu_text(text, subtext, flags);
|
||||
if (text == MENU_SEPARATOR_ITEM)
|
||||
item_append(menu_item_type::SEPARATOR);
|
||||
item_append(menu_item_type::SEPARATOR, flags);
|
||||
else
|
||||
item_append(text, subtext, flags, curcheat.get());
|
||||
}
|
||||
|
@ -110,7 +110,7 @@ void menu_dats_view::populate()
|
||||
|
||||
(m_issoft == true) ? get_data_sw() : get_data();
|
||||
|
||||
item_append(menu_item_type::SEPARATOR);
|
||||
item_append(menu_item_type::SEPARATOR, (FLAG_UI_DATS | FLAG_LEFT_ARROW | FLAG_RIGHT_ARROW));
|
||||
customtop = 2.0f * ui().get_line_height() + 4.0f * UI_BOX_TB_BORDER;
|
||||
custombottom = ui().get_line_height() + 3.0f * UI_BOX_TB_BORDER;
|
||||
|
||||
|
@ -318,10 +318,10 @@ void menu::item_append(menu_item item)
|
||||
// end of the menu
|
||||
//-------------------------------------------------
|
||||
|
||||
void menu::item_append(menu_item_type type)
|
||||
void menu::item_append(menu_item_type type, UINT32 flags)
|
||||
{
|
||||
if (type == menu_item_type::SEPARATOR)
|
||||
item_append(MENU_SEPARATOR_ITEM, "", 0, nullptr, menu_item_type::SEPARATOR);
|
||||
item_append(MENU_SEPARATOR_ITEM, "", flags, nullptr, menu_item_type::SEPARATOR);
|
||||
}
|
||||
|
||||
//-------------------------------------------------
|
||||
|
@ -66,7 +66,7 @@ public:
|
||||
void item_append(const std::string &text, const std::string &subtext, UINT32 flags, void *ref, menu_item_type type = menu_item_type::UNKNOWN);
|
||||
void item_append(std::string &&text, std::string &&subtext, UINT32 flags, void *ref, menu_item_type type = menu_item_type::UNKNOWN);
|
||||
void item_append(menu_item item);
|
||||
void item_append(menu_item_type type);
|
||||
void item_append(menu_item_type type, UINT32 flags = 0);
|
||||
|
||||
// configure the menu for custom rendering
|
||||
virtual void custom_render(void *selectedref, float top, float bottom, float x, float y, float x2, float y2);
|
||||
|
@ -501,6 +501,7 @@ void menu_select_game::populate()
|
||||
ui_globals::redraw_icon = true;
|
||||
ui_globals::switch_image = true;
|
||||
int old_item_selected = -1;
|
||||
UINT32 flags_ui = FLAG_UI | FLAG_LEFT_ARROW | FLAG_RIGHT_ARROW;
|
||||
|
||||
if (!isfavorite())
|
||||
{
|
||||
@ -537,8 +538,6 @@ void menu_select_game::populate()
|
||||
int curitem = 0;
|
||||
for (auto & elem : m_displaylist)
|
||||
{
|
||||
UINT32 flags_ui = FLAG_UI | FLAG_LEFT_ARROW | FLAG_RIGHT_ARROW;
|
||||
|
||||
if (old_item_selected == -1 && elem->name == reselect_last::driver)
|
||||
old_item_selected = curitem;
|
||||
|
||||
@ -549,10 +548,8 @@ void menu_select_game::populate()
|
||||
if (cx != -1 && ((driver_list::driver(cx).flags & MACHINE_IS_BIOS_ROOT) != 0))
|
||||
cloneof = false;
|
||||
}
|
||||
if (cloneof)
|
||||
flags_ui |= FLAG_INVERT;
|
||||
|
||||
item_append(elem->description, "", flags_ui, (void *)elem);
|
||||
item_append(elem->description, "", (cloneof) ? (flags_ui | FLAG_INVERT) : flags_ui, (void *)elem);
|
||||
curitem++;
|
||||
}
|
||||
}
|
||||
@ -565,7 +562,7 @@ void menu_select_game::populate()
|
||||
// iterate over entries
|
||||
for (auto & mfavorite : mame_machine_manager::instance()->favorite().m_list)
|
||||
{
|
||||
UINT32 flags_ui = FLAG_UI | FLAG_LEFT_ARROW | FLAG_RIGHT_ARROW | FLAG_UI_FAVORITE;
|
||||
auto flags = flags_ui | FLAG_UI_FAVORITE;
|
||||
if (mfavorite.startempty == 1)
|
||||
{
|
||||
if (old_item_selected == -1 && mfavorite.shortname == reselect_last::driver)
|
||||
@ -578,28 +575,25 @@ void menu_select_game::populate()
|
||||
if (cx != -1 && ((driver_list::driver(cx).flags & MACHINE_IS_BIOS_ROOT) != 0))
|
||||
cloneof = false;
|
||||
}
|
||||
if (cloneof)
|
||||
flags_ui |= FLAG_INVERT;
|
||||
|
||||
item_append(mfavorite.longname, "", flags_ui, (void *)&mfavorite);
|
||||
item_append(mfavorite.longname, "", (cloneof) ? (flags | FLAG_INVERT) : flags, (void *)&mfavorite);
|
||||
}
|
||||
else
|
||||
{
|
||||
if (old_item_selected == -1 && mfavorite.shortname == reselect_last::driver)
|
||||
old_item_selected = curitem;
|
||||
item_append(mfavorite.longname, mfavorite.devicetype,
|
||||
mfavorite.parentname.empty() ? flags_ui : (FLAG_INVERT | flags_ui), (void *)&mfavorite);
|
||||
mfavorite.parentname.empty() ? flags : (FLAG_INVERT | flags), (void *)&mfavorite);
|
||||
}
|
||||
curitem++;
|
||||
}
|
||||
}
|
||||
|
||||
item_append(menu_item_type::SEPARATOR);
|
||||
item_append(menu_item_type::SEPARATOR, flags_ui);
|
||||
|
||||
// add special items
|
||||
if (menu::stack_has_special_main_menu())
|
||||
{
|
||||
UINT32 flags_ui = FLAG_UI | FLAG_LEFT_ARROW | FLAG_RIGHT_ARROW;
|
||||
item_append(_("Configure Options"), "", flags_ui, (void *)(FPTR)CONF_OPTS);
|
||||
item_append(_("Configure Machine"), "", flags_ui, (void *)(FPTR)CONF_MACHINE);
|
||||
skip_main_items = 2;
|
||||
|
@ -492,7 +492,7 @@ void menu_select_software::populate()
|
||||
(void *)m_searchlist[curitem]);
|
||||
}
|
||||
|
||||
item_append(menu_item_type::SEPARATOR);
|
||||
item_append(menu_item_type::SEPARATOR, flags_ui);
|
||||
|
||||
// configure the custom rendering
|
||||
customtop = 4.0f * ui().get_line_height() + 5.0f * UI_BOX_TB_BORDER;
|
||||
|
Loading…
Reference in New Issue
Block a user