summaryrefslogtreecommitdiffstatshomepage
path: root/src/frontend/mame/ui
diff options
context:
space:
mode:
author Vas Crabb <vas@vastheman.com>2021-10-10 01:16:25 +1100
committer Vas Crabb <vas@vastheman.com>2021-10-10 01:16:25 +1100
commitcfbba3ed77d0f8b2d60f04347a32c0b8268f06be (patch)
tree53b44b75e025c2debd3b69506f83eee473dfcf31 /src/frontend/mame/ui
parentddb4bf465095d9187586bb2c4fd1953a229c37f7 (diff)
frontend: Moved plugins menu off the main menu - it's only one level deeper now.
Diffstat (limited to 'src/frontend/mame/ui')
-rw-r--r--src/frontend/mame/ui/optsmenu.cpp17
-rw-r--r--src/frontend/mame/ui/optsmenu.h6
-rw-r--r--src/frontend/mame/ui/selgame.cpp15
-rw-r--r--src/frontend/mame/ui/selgame.h1
4 files changed, 15 insertions, 24 deletions
diff --git a/src/frontend/mame/ui/optsmenu.cpp b/src/frontend/mame/ui/optsmenu.cpp
index 922bbb5b6fa..88486463ab9 100644
--- a/src/frontend/mame/ui/optsmenu.cpp
+++ b/src/frontend/mame/ui/optsmenu.cpp
@@ -11,13 +11,14 @@
#include "emu.h"
#include "ui/optsmenu.h"
-#include "ui/ui.h"
-#include "ui/submenu.h"
-#include "ui/selector.h"
#include "ui/custui.h"
-#include "ui/sndmenu.h"
-#include "ui/inputmap.h"
#include "ui/dirmenu.h"
+#include "ui/inputmap.h"
+#include "ui/miscmenu.h"
+#include "ui/selector.h"
+#include "ui/sndmenu.h"
+#include "ui/submenu.h"
+#include "ui/ui.h"
#include "mame.h"
#include "mameopts.h"
@@ -74,6 +75,8 @@ void menu_simple_game_options::populate(float &customtop, float &custombottom)
item_append(_(submenu::control_options()[0].description), 0, (void *)(uintptr_t)CONTROLLER_MENU);
item_append(_("General Inputs"), 0, (void *)(uintptr_t)CGI_MENU);
item_append(_(submenu::advanced_options()[0].description), 0, (void *)(uintptr_t)ADVANCED_MENU);
+ if (machine().options().plugins())
+ item_append(_("Plugins"), 0, (void *)(uintptr_t)PLUGINS_MENU);
item_append(menu_item_type::SEPARATOR);
item_append(_("Save Configuration"), 0, (void *)(uintptr_t)SAVE_CONFIG);
@@ -125,6 +128,10 @@ void menu_simple_game_options::handle_item_event(event const &menu_event)
ui_globals::reset = true;
}
break;
+ case PLUGINS_MENU:
+ if (menu_event.iptkey == IPT_UI_SELECT)
+ menu::stack_push<menu_plugins_configure>(ui(), container());
+ break;
case SAVE_CONFIG:
if (menu_event.iptkey == IPT_UI_SELECT)
ui().save_main_option();
diff --git a/src/frontend/mame/ui/optsmenu.h b/src/frontend/mame/ui/optsmenu.h
index 2afe9b68a89..1809f1bd204 100644
--- a/src/frontend/mame/ui/optsmenu.h
+++ b/src/frontend/mame/ui/optsmenu.h
@@ -39,11 +39,11 @@ private:
{
DISPLAY_MENU = 1001,
SOUND_MENU,
- CONTROLLER_MENU,
MISC_MENU,
- ADVANCED_MENU,
- SAVE_OPTIONS,
+ CONTROLLER_MENU,
CGI_MENU,
+ ADVANCED_MENU,
+ PLUGINS_MENU,
SAVE_CONFIG
};
diff --git a/src/frontend/mame/ui/selgame.cpp b/src/frontend/mame/ui/selgame.cpp
index 5516079237a..b940aac2705 100644
--- a/src/frontend/mame/ui/selgame.cpp
+++ b/src/frontend/mame/ui/selgame.cpp
@@ -861,11 +861,6 @@ void menu_select_game::populate(float &customtop, float &custombottom)
item_append(_("Configure Options"), FLAGS_UI, (void *)(uintptr_t)CONF_OPTS);
item_append(_("Configure Machine"), FLAGS_UI, (void *)(uintptr_t)CONF_MACHINE);
skip_main_items = 2;
- if (machine().options().plugins())
- {
- item_append(_("Plugins"), FLAGS_UI, (void *)(uintptr_t)CONF_PLUGINS);
- skip_main_items++;
- }
}
else
skip_main_items = 0;
@@ -1037,11 +1032,6 @@ void menu_select_game::inkey_select(const event *menu_event)
menu::stack_push<menu_machine_configure>(ui(), container(), *reinterpret_cast<const ui_system_info *>(m_prev_selected));
return;
}
- else if (uintptr_t(system) == CONF_PLUGINS)
- {
- // special case for configure plugins
- menu::stack_push<menu_plugins_configure>(ui(), container());
- }
else
{
// anything else is a driver
@@ -1111,11 +1101,6 @@ void menu_select_game::inkey_select_favorite(const event *menu_event)
}
return;
}
- else if (uintptr_t(ui_swinfo) == CONF_PLUGINS)
- {
- // special case for configure plugins
- menu::stack_push<menu_plugins_configure>(ui(), container());
- }
else if (ui_swinfo->startempty == 1)
{
driver_enumerator enumerator(machine().options(), *ui_swinfo->driver);
diff --git a/src/frontend/mame/ui/selgame.h b/src/frontend/mame/ui/selgame.h
index 7eac71d534d..d459c0b53e0 100644
--- a/src/frontend/mame/ui/selgame.h
+++ b/src/frontend/mame/ui/selgame.h
@@ -34,7 +34,6 @@ private:
{
CONF_OPTS = 1,
CONF_MACHINE,
- CONF_PLUGINS,
};
using icon_cache = texture_lru<game_driver const *>;