summaryrefslogtreecommitdiffstatshomepage
path: root/src
diff options
context:
space:
mode:
author Miodrag Milanovic <mmicko@gmail.com>2016-02-04 15:13:05 +0100
committer Miodrag Milanovic <mmicko@gmail.com>2016-02-04 15:14:29 +0100
commit024d67c14f250229765384fc97f8a115d068e622 (patch)
tree4a36bea56908816b7ac8f40d1c669aac7c5e9473 /src
parent52d97f0dfa95c6400001bf986b6aac6ea9a95a22 (diff)
removed UME filtering (nw)
Diffstat (limited to 'src')
-rw-r--r--src/emu/ui/menu.cpp65
-rw-r--r--src/emu/ui/menu.h3
-rw-r--r--src/emu/ui/moptions.cpp1
-rw-r--r--src/emu/ui/moptions.h2
-rw-r--r--src/emu/ui/optsmenu.cpp24
-rw-r--r--src/emu/ui/optsmenu.h3
-rw-r--r--src/emu/ui/selgame.cpp34
-rw-r--r--src/emu/ui/utils.cpp5
-rw-r--r--src/emu/ui/utils.h12
9 files changed, 3 insertions, 146 deletions
diff --git a/src/emu/ui/menu.cpp b/src/emu/ui/menu.cpp
index 2d9a6f679c2..23e9143f392 100644
--- a/src/emu/ui/menu.cpp
+++ b/src/emu/ui/menu.cpp
@@ -1950,12 +1950,6 @@ void ui_menu::handle_main_events(UINT32 flags)
selected = visible_items + 2;
stop = true;
}
- else if (hover >= HOVER_MAME_ALL && hover <= HOVER_MAME_SYSTEMS)
- {
- ume_filters::actual = (HOVER_MAME_ALL - hover) * (-1);
- menu_event.iptkey = IPT_OTHER;
- stop = true;
- }
else if (hover >= HOVER_RP_FIRST && hover <= HOVER_RP_LAST)
{
ui_globals::rpanel = (HOVER_RP_FIRST - hover) * (-1);
@@ -2030,65 +2024,6 @@ void ui_menu::handle_main_events(UINT32 flags)
}
//-------------------------------------------------
-// draw UME box
-//-------------------------------------------------
-
-void ui_menu::draw_ume_box(float x1, float y1, float x2, float y2)
-{
- float text_size = 0.65f;
- ui_manager &mui = machine().ui();
- float line_height = mui.get_line_height() * text_size;
- float maxwidth = 0.0f;
-
- for (int x = 0; x < ume_filters::length; x++)
- {
- float width;
- // compute width of left hand side
- mui.draw_text_full(container, ume_filters::text[x], 0.0f, 0.0f, 1.0f, JUSTIFY_CENTER, WRAP_NEVER,
- DRAW_NONE, UI_TEXT_COLOR, ARGB_BLACK, &width, nullptr, text_size);
- width += 2 * UI_BOX_LR_BORDER;
- maxwidth = MAX(maxwidth, width);
- }
-
- x2 = x1 + maxwidth;
-
- mui.draw_outlined_box(container, x1, y1, x2, y2, UI_BACKGROUND_COLOR);
-
- // take off the borders
- x1 += UI_BOX_LR_BORDER;
- x2 -= UI_BOX_LR_BORDER;
- y1 += UI_BOX_TB_BORDER;
- y2 -= UI_BOX_TB_BORDER;
-
- for (int filter = 0; filter < ume_filters::length; filter++)
- {
- rgb_t bgcolor = UI_TEXT_BG_COLOR;
- rgb_t fgcolor = UI_TEXT_COLOR;
-
- if (mouse_hit && x1 <= mouse_x && x2 > mouse_x && y1 <= mouse_y && y1 + line_height > mouse_y)
- {
- bgcolor = UI_MOUSEOVER_BG_COLOR;
- fgcolor = UI_MOUSEOVER_COLOR;
- hover = HOVER_MAME_ALL + filter;
- }
-
- if (ume_filters::actual == filter)
- {
- bgcolor = UI_SELECTED_BG_COLOR;
- fgcolor = UI_SELECTED_COLOR;
- }
-
- if (bgcolor != UI_TEXT_BG_COLOR)
- container->add_rect(x1, y1, x2, y1 + line_height, bgcolor, PRIMFLAG_BLENDMODE(BLENDMODE_ALPHA) | PRIMFLAG_TEXWRAP(TRUE));
-
- mui.draw_text_full(container, ume_filters::text[filter], x1, y1, x2 - x1, JUSTIFY_CENTER, WRAP_NEVER,
- DRAW_NORMAL, fgcolor, bgcolor, nullptr, nullptr, text_size);
-
- y1 += line_height;
- }
-}
-
-//-------------------------------------------------
// draw right box title
//-------------------------------------------------
diff --git a/src/emu/ui/menu.h b/src/emu/ui/menu.h
index 606e66c5908..43c88330d66 100644
--- a/src/emu/ui/menu.h
+++ b/src/emu/ui/menu.h
@@ -204,9 +204,6 @@ public:
INT32 mouse_target_x, mouse_target_y;
float mouse_x, mouse_y;
- // draw UME box
- void draw_ume_box(float x1, float y1, float x2, float y2);
-
// draw toolbar
void draw_toolbar(float x1, float y1, float x2, float y2, bool software = false);
diff --git a/src/emu/ui/moptions.cpp b/src/emu/ui/moptions.cpp
index 7d68bd7d483..419769ac977 100644
--- a/src/emu/ui/moptions.cpp
+++ b/src/emu/ui/moptions.cpp
@@ -49,7 +49,6 @@ const options_entry ui_options::s_option_entries[] =
{ OPTION_USE_BACKGROUND, "1", OPTION_BOOLEAN, "enable background image in main view" },
{ OPTION_SKIP_BIOS_MENU, "0", OPTION_BOOLEAN, "skip bios submenu, start with configured or default" },
{ OPTION_SKIP_PARTS_MENU, "0", OPTION_BOOLEAN, "skip parts submenu, start with first part" },
- { OPTION_START_FILTER, "0", OPTION_INTEGER, "startup filter (0 = ALL, 1 = ARCADES, 2 = SYSTEMS)" },
{ OPTION_LAST_USED_FILTER, "", OPTION_STRING, "latest used filter" },
{ OPTION_LAST_USED_MACHINE, "", OPTION_STRING, "latest used machine" },
{ OPTION_INFO_AUTO_AUDIT, "0", OPTION_BOOLEAN, "enable auto audit in the general info panel" },
diff --git a/src/emu/ui/moptions.h b/src/emu/ui/moptions.h
index 5baf153ff3d..59e04506fcc 100644
--- a/src/emu/ui/moptions.h
+++ b/src/emu/ui/moptions.h
@@ -44,7 +44,6 @@
#define OPTION_USE_BACKGROUND "use_background"
#define OPTION_SKIP_BIOS_MENU "skip_biosmenu"
#define OPTION_SKIP_PARTS_MENU "skip_partsmenu"
-#define OPTION_START_FILTER "start_filter"
#define OPTION_LAST_USED_FILTER "last_used_filter"
#define OPTION_LAST_USED_MACHINE "last_used_machine"
#define OPTION_INFO_AUTO_AUDIT "info_audit_enabled"
@@ -106,7 +105,6 @@ public:
bool use_background_image() const { return bool_value(OPTION_USE_BACKGROUND); }
bool skip_bios_menu() const { return bool_value(OPTION_SKIP_BIOS_MENU); }
bool skip_parts_menu() const { return bool_value(OPTION_SKIP_PARTS_MENU); }
- int start_filter() const { return int_value(OPTION_START_FILTER); }
const char *last_used_machine() const { return value(OPTION_LAST_USED_MACHINE); }
const char *last_used_filter() const { return value(OPTION_LAST_USED_FILTER); }
bool info_audit() const { return bool_value(OPTION_INFO_AUTO_AUDIT); }
diff --git a/src/emu/ui/optsmenu.cpp b/src/emu/ui/optsmenu.cpp
index dc86e3e7178..116519b25e7 100644
--- a/src/emu/ui/optsmenu.cpp
+++ b/src/emu/ui/optsmenu.cpp
@@ -205,24 +205,6 @@ void ui_menu_game_options::handle()
if (m_event->iptkey == IPT_UI_SELECT)
ui_menu::stack_push(global_alloc_clear<ui_menu_custom_filter>(machine(), container));
break;
-
- case UME_SYSTEM:
- if (m_event->iptkey == IPT_UI_LEFT || m_event->iptkey == IPT_UI_RIGHT)
- {
- (m_event->iptkey == IPT_UI_RIGHT) ? ume_filters::actual++ : ume_filters::actual--;
- changed = true;
- }
- else if (m_event->iptkey == IPT_UI_SELECT)
- {
- int total = ume_filters::length;
- std::vector<std::string> s_sel(total);
- for (int index = 0; index < total; ++index)
- s_sel[index] = ume_filters::text[index];
-
- ui_menu::stack_push(global_alloc_clear<ui_menu_selector>(machine(), container, s_sel, ume_filters::actual));
- }
-
- break;
}
if (changed)
@@ -239,11 +221,7 @@ void ui_menu_game_options::populate()
std::string fbuff;
// add filter item
- UINT32 arrow_flags = get_arrow_flags(0, ume_filters::length - 1, ume_filters::actual);
- item_append("Machine", ume_filters::text[ume_filters::actual], arrow_flags, (void *)(FPTR)UME_SYSTEM);
-
- // add filter item
- arrow_flags = get_arrow_flags((int)FILTER_FIRST, (int)FILTER_LAST, main_filters::actual);
+ UINT32 arrow_flags = get_arrow_flags((int)FILTER_FIRST, (int)FILTER_LAST, main_filters::actual);
item_append("Filter", main_filters::text[main_filters::actual], arrow_flags, (void *)(FPTR)FILTER_MENU);
// add category subitem
diff --git a/src/emu/ui/optsmenu.h b/src/emu/ui/optsmenu.h
index c1d46a9c80e..71196284c3d 100644
--- a/src/emu/ui/optsmenu.h
+++ b/src/emu/ui/optsmenu.h
@@ -38,8 +38,7 @@ private:
CONTROLLER_MENU,
SAVE_OPTIONS,
CGI_MENU,
- CUSTOM_FILTER,
- UME_SYSTEM
+ CUSTOM_FILTER
};
};
diff --git a/src/emu/ui/selgame.cpp b/src/emu/ui/selgame.cpp
index a1cd39508ac..e931c6a8d73 100644
--- a/src/emu/ui/selgame.cpp
+++ b/src/emu/ui/selgame.cpp
@@ -173,7 +173,6 @@ ui_menu_select_game::ui_menu_select_game(running_machine &machine, render_contai
ui_globals::curdats_view = MEWUI_FIRST_LOAD;
ui_globals::switch_image = false;
ui_globals::default_image = true;
- ume_filters::actual = moptions.start_filter();
ui_globals::panels_status = moptions.hide_panels();
}
@@ -206,7 +205,6 @@ ui_menu_select_game::~ui_menu_select_game()
else if (main_filters::actual == FILTER_SCREEN)
filter.append(",").append(screen_filters::text[screen_filters::actual]);
- mopt.set_value(OPTION_START_FILTER, ume_filters::actual, OPTION_PRIORITY_CMDLINE, error_string);
mopt.set_value(OPTION_LAST_USED_FILTER, filter.c_str(), OPTION_PRIORITY_CMDLINE, error_string);
mopt.set_value(OPTION_LAST_USED_MACHINE, last_driver.c_str(), OPTION_PRIORITY_CMDLINE, error_string);
mopt.set_value(OPTION_HIDE_PANELS, ui_globals::panels_status, OPTION_PRIORITY_CMDLINE, error_string);
@@ -755,13 +753,7 @@ void ui_menu_select_game::custom_render(void *selectedref, float top, float bott
ui_manager &mui = machine().ui();
float tbarspace = mui.get_line_height();
- if (ume_filters::actual == MEWUI_MAME)
- strprintf(tempbuf[0], "MAME %s ( %d / %d machines (%d BIOS) )", bare_build_version, visible_items, (driver_list::total() - 1), m_isabios + m_issbios);
- else if (ume_filters::actual == MEWUI_ARCADES)
- strprintf(tempbuf[0], "MAME %s ( %d / %d arcades (%d BIOS) )", bare_build_version, visible_items, m_isarcades, m_isabios);
- else if (ume_filters::actual == MEWUI_SYSTEMS)
- strprintf(tempbuf[0], "MAME %s ( %d / %d systems (%d BIOS) )", bare_build_version, visible_items, m_issystems, m_issbios);
-
+ strprintf(tempbuf[0], "MAME %s ( %d / %d machines (%d BIOS) )", bare_build_version, visible_items, (driver_list::total() - 1), m_isabios + m_issbios);
std::string filtered;
if (main_filters::actual == FILTER_CATEGORY && !machine().inifile().ini_index.empty())
@@ -817,11 +809,6 @@ void ui_menu_select_game::custom_render(void *selectedref, float top, float bott
y1 += mui.get_line_height();
}
- // draw ume box
- x1 -= UI_BOX_LR_BORDER;
- y1 = origy1 - top;
- draw_ume_box(x1, y1, x2, y2);
-
// determine the text to render below
if (main_filters::actual != FILTER_FAVORITE_GAME)
driver = ((FPTR)selectedref > 2) ? (const game_driver *)selectedref : nullptr;
@@ -1235,12 +1222,6 @@ void ui_menu_select_game::build_list(std::vector<const game_driver *> &s_drivers
if (!bioscheck && filter != FILTER_BIOS && (s_driver->flags & MACHINE_IS_BIOS_ROOT) != 0)
continue;
- if ((s_driver->flags & MACHINE_TYPE_ARCADE) && ume_filters::actual == MEWUI_SYSTEMS)
- continue;
-
- if (!(s_driver->flags & MACHINE_TYPE_ARCADE) && ume_filters::actual == MEWUI_ARCADES)
- continue;
-
switch (filter)
{
case FILTER_ALL:
@@ -1344,12 +1325,6 @@ void ui_menu_select_game::build_custom()
for (auto & elem : s_drivers)
{
- if ((elem->flags & MACHINE_TYPE_ARCADE) && ume_filters::actual == MEWUI_SYSTEMS)
- continue;
-
- if (!(elem->flags & MACHINE_TYPE_ARCADE) && ume_filters::actual == MEWUI_ARCADES)
- continue;
-
m_displaylist.push_back(elem);
}
@@ -1423,13 +1398,6 @@ void ui_menu_select_game::build_from_cache(std::vector<const game_driver *> &s_d
{
if (!bioscheck && filter != FILTER_BIOS && (s_driver->flags & MACHINE_IS_BIOS_ROOT) != 0)
continue;
-
- if ((s_driver->flags & MACHINE_TYPE_ARCADE) && ume_filters::actual == MEWUI_SYSTEMS)
- continue;
-
- if (!(s_driver->flags & MACHINE_TYPE_ARCADE) && ume_filters::actual == MEWUI_ARCADES)
- continue;
-
int idx = driver_list::find(s_driver->name);
switch (filter)
diff --git a/src/emu/ui/utils.cpp b/src/emu/ui/utils.cpp
index 7bca1943884..e3e71b096b0 100644
--- a/src/emu/ui/utils.cpp
+++ b/src/emu/ui/utils.cpp
@@ -42,11 +42,6 @@ UINT16 screen_filters::actual = 0;
const char *screen_filters::text[] = { "<none>", "Raster", "Vector", "LCD" };
size_t screen_filters::length = ARRAY_LENGTH(screen_filters::text);
-// UME
-UINT16 ume_filters::actual = 0;
-const char *ume_filters::text[] = { "ALL", "ARCADES", "SYSTEMS" };
-size_t ume_filters::length = ARRAY_LENGTH(ume_filters::text);
-
// Globals
UINT8 ui_globals::rpanel = 0;
UINT8 ui_globals::curimage_view = 0;
diff --git a/src/emu/ui/utils.h b/src/emu/ui/utils.h
index 4f1f5076351..db1be4fc25c 100644
--- a/src/emu/ui/utils.h
+++ b/src/emu/ui/utils.h
@@ -128,15 +128,6 @@ enum
enum
{
- MEWUI_MAME_FIRST = 0,
- MEWUI_MAME = MEWUI_MAME_FIRST,
- MEWUI_ARCADES,
- MEWUI_SYSTEMS,
- MEWUI_MAME_LAST = MEWUI_SYSTEMS
-};
-
-enum
-{
HOVER_DAT_UP = -1000,
HOVER_DAT_DOWN,
HOVER_UI_LEFT,
@@ -152,9 +143,6 @@ enum
HOVER_B_SETTINGS,
HOVER_RPANEL_ARROW,
HOVER_LPANEL_ARROW,
- HOVER_MAME_ALL,
- HOVER_MAME_ARCADES,
- HOVER_MAME_SYSTEMS,
HOVER_FILTER_FIRST,
HOVER_FILTER_LAST = (HOVER_FILTER_FIRST) + 1 + FILTER_LAST,
HOVER_SW_FILTER_FIRST,