summaryrefslogtreecommitdiffstats
path: root/src/frontend/mame/ui/utils.h
diff options
context:
space:
mode:
author Vas Crabb <vas@vastheman.com>2017-08-11 10:11:44 +1000
committer Vas Crabb <vas@vastheman.com>2017-08-11 10:11:44 +1000
commitcb7a04174fa62761853a825c12fb261ea8854d32 (patch)
tree412f0d04dacc5f404111c9075d1032f330a9bfeb /src/frontend/mame/ui/utils.h
parent196a7ea1cea05319eb6b0394f5204a304732eddf (diff)
ui: make category filter work like all the other filters
* category filter is now saved/restored if it's last used * category filter can be used in composite custom filters * category filter now provides UI rather than relying on options menu * less confusing when no categories found * also de-duplicated code for drawing category list (nw) please test this everyone and let me know if there are reproducible crashes or things that don't work right - I'm trying to make the internal UI more consistent and stable
Diffstat (limited to 'src/frontend/mame/ui/utils.h')
-rw-r--r--src/frontend/mame/ui/utils.h6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/frontend/mame/ui/utils.h b/src/frontend/mame/ui/utils.h
index 67685bcfdba..7018007eaee 100644
--- a/src/frontend/mame/ui/utils.h
+++ b/src/frontend/mame/ui/utils.h
@@ -272,11 +272,9 @@ enum
HOVER_RPANEL_ARROW,
HOVER_LPANEL_ARROW,
HOVER_FILTER_FIRST,
- HOVER_FILTER_LAST = (HOVER_FILTER_FIRST) + ui::machine_filter::COUNT,
- HOVER_SW_FILTER_FIRST,
- HOVER_SW_FILTER_LAST = (HOVER_SW_FILTER_FIRST) + ui::software_filter::COUNT,
+ HOVER_FILTER_LAST = HOVER_FILTER_FIRST + std::max<unsigned>(ui::machine_filter::COUNT, ui::software_filter::COUNT),
HOVER_RP_FIRST,
- HOVER_RP_LAST = (HOVER_RP_FIRST) + 1 + RP_LAST,
+ HOVER_RP_LAST = HOVER_RP_FIRST + 1 + RP_LAST,
HOVER_INFO_TEXT
};