summaryrefslogtreecommitdiffstatshomepage
path: root/src/frontend/mame/ui/menu.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/frontend/mame/ui/menu.h')
-rw-r--r--src/frontend/mame/ui/menu.h25
1 files changed, 14 insertions, 11 deletions
diff --git a/src/frontend/mame/ui/menu.h b/src/frontend/mame/ui/menu.h
index ffcb0ed71e8..1a6c2d977f8 100644
--- a/src/frontend/mame/ui/menu.h
+++ b/src/frontend/mame/ui/menu.h
@@ -27,7 +27,6 @@
namespace ui {
-
/***************************************************************************
TYPE DEFINITIONS
***************************************************************************/
@@ -36,17 +35,18 @@ class menu
{
public:
// flags for menu items
- enum : unsigned
+ enum
{
- FLAG_LEFT_ARROW = 1U << 0,
- FLAG_RIGHT_ARROW = 1U << 1,
- FLAG_INVERT = 1U << 2,
- FLAG_MULTILINE = 1U << 3,
- FLAG_REDTEXT = 1U << 4,
- FLAG_DISABLE = 1U << 5,
- FLAG_UI_DATS = 1U << 6,
- FLAG_UI_HEADING = 1U << 7,
- FLAG_COLOR_BOX = 1U << 8
+ FLAG_LEFT_ARROW = (1 << 0),
+ FLAG_RIGHT_ARROW = (1 << 1),
+ FLAG_INVERT = (1 << 2),
+ FLAG_MULTILINE = (1 << 3),
+ FLAG_REDTEXT = (1 << 4),
+ FLAG_DISABLE = (1 << 5),
+ FLAG_UI_DATS = (1 << 6),
+ FLAG_UI_FAVORITE = (1 << 7),
+ FLAG_UI_HEADING = (1 << 8),
+ FLAG_COLOR_BOX = (1 << 9)
};
virtual ~menu();
@@ -151,6 +151,7 @@ protected:
void reset(reset_options options);
void reset_parent(reset_options options) { m_parent->reset(options); }
+ void reset_topmost(reset_options options) { m_global_state->reset_topmost(options); }
template <typename T> T *topmost_menu() const { return m_global_state->topmost_menu<T>(); }
template <typename T> static T *topmost_menu(running_machine &machine) { return get_global_state(machine)->topmost_menu<T>(); }
@@ -309,6 +310,8 @@ private:
bitmap_argb32 *bgrnd_bitmap() { return m_bgrnd_bitmap.get(); }
render_texture *bgrnd_texture() { return m_bgrnd_texture.get(); }
+ void reset_topmost(reset_options options) { if (m_stack) m_stack->reset(options); }
+
template <typename T>
T *topmost_menu() const { return dynamic_cast<T *>(m_stack.get()); }