summaryrefslogtreecommitdiffstats
path: root/src/frontend/mame/ui/selmenu.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/frontend/mame/ui/selmenu.cpp')
-rw-r--r--src/frontend/mame/ui/selmenu.cpp27
1 files changed, 12 insertions, 15 deletions
diff --git a/src/frontend/mame/ui/selmenu.cpp b/src/frontend/mame/ui/selmenu.cpp
index a66212c020b..303334de17b 100644
--- a/src/frontend/mame/ui/selmenu.cpp
+++ b/src/frontend/mame/ui/selmenu.cpp
@@ -855,18 +855,10 @@ void menu_select_launch::inkey_dats()
ui_software_info const *software;
ui_system_info const *system;
get_selection(software, system);
- if (software)
- {
- if (software->startempty && mame_machine_manager::instance()->lua()->call_plugin_check<const char *>("data_list", software->driver->name, true))
- menu::stack_push<menu_dats_view>(ui(), container(), system);
- else if (mame_machine_manager::instance()->lua()->call_plugin_check<const char *>("data_list", std::string(software->shortname).append(1, ',').append(software->listname).c_str()) || !software->infotext.empty())
- menu::stack_push<menu_dats_view>(ui(), container(), software);
- }
+ if (software && !software->startempty)
+ menu::stack_push<menu_dats_view>(ui(), container(), software);
else if (system)
- {
- if (mame_machine_manager::instance()->lua()->call_plugin_check<const char *>("data_list", system->driver->name, true))
- menu::stack_push<menu_dats_view>(ui(), container(), system);
- }
+ menu::stack_push<menu_dats_view>(ui(), container(), system);
}
@@ -1299,23 +1291,28 @@ void menu_select_launch::draw_toolbar(float x1, float y1, float x2, float y2)
x1 = (std::min)(backtrack_pos - (float(toolbar_count) * x_spacing), x1 + ((x2 - x1 - total_width) * 0.5f));
for (int z = 0; toolbar_count > z; ++z, x1 += x_spacing)
{
+ auto const bitmap = toolbar_bitmaps[z];
x2 = x1 + x_size;
color = rgb_t (0xffcccccc);
if (mouse_in_rect(x1, y1, x2, y2))
{
- set_hover(HOVER_B_FAV + toolbar_bitmaps[z]);
- color = rgb_t::white();
+ bool const need_selection = (TOOLBAR_BITMAP_FAVORITE == bitmap) || (TOOLBAR_BITMAP_INFO == bitmap);
+ if (!need_selection || get_selection_ptr())
+ {
+ set_hover(HOVER_B_FAV + bitmap);
+ color = rgb_t::white();
+ }
float ypos = y2 + ui().get_line_height() + 2.0f * ui().box_tb_border();
ui().draw_text_box(
container(),
- _(hover_msg[toolbar_bitmaps[z]]),
+ _(hover_msg[bitmap]),
text_layout::text_justify::CENTER, (x1 + x2) * 0.5f, ypos,
ui().colors().background_color());
}
container().add_quad(
x1, y1, x2, y2,
color,
- m_cache.toolbar_textures()[toolbar_bitmaps[z]].get(),
+ m_cache.toolbar_textures()[bitmap].get(),
PRIMFLAG_BLENDMODE(BLENDMODE_ALPHA));
}
}