mirror of
https://github.com/holub/mame
synced 2025-06-30 16:00:01 +03:00
frontend: Moved plugins menu off the main menu - it's only one level deeper now.
This commit is contained in:
parent
ddb4bf4650
commit
cfbba3ed77
@ -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();
|
||||
|
@ -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
|
||||
};
|
||||
|
||||
|
@ -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);
|
||||
|
@ -34,7 +34,6 @@ private:
|
||||
{
|
||||
CONF_OPTS = 1,
|
||||
CONF_MACHINE,
|
||||
CONF_PLUGINS,
|
||||
};
|
||||
|
||||
using icon_cache = texture_lru<game_driver const *>;
|
||||
|
Loading…
Reference in New Issue
Block a user