summaryrefslogtreecommitdiffstats
path: root/src/frontend/mame/ui/ui.cpp
diff options
context:
space:
mode:
author Vas Crabb <vas@vastheman.com>2021-03-12 01:15:08 +1100
committer Vas Crabb <vas@vastheman.com>2021-03-12 01:15:08 +1100
commit4cf96da22c09651c1da2b27ee61028d558e7af49 (patch)
tree4482cdc706be33b29d050fb8b0f84c457ba20ba9 /src/frontend/mame/ui/ui.cpp
parentb38a77bca54c007f995b9bb47687354d154b6be5 (diff)
-A few incremental UI code improvements:
* Simplified message when toggling UI controls. * Show actual configured UI toggle key, not misleading hard-coded text. * Push window activated/deactivated events to UI manager. * Simplified SDL window event handling code - events are pretty precise. -Miscellaneous code cleanup.
Diffstat (limited to 'src/frontend/mame/ui/ui.cpp')
-rw-r--r--src/frontend/mame/ui/ui.cpp24
1 files changed, 5 insertions, 19 deletions
diff --git a/src/frontend/mame/ui/ui.cpp b/src/frontend/mame/ui/ui.cpp
index f5e04284cd7..b41c0703ec0 100644
--- a/src/frontend/mame/ui/ui.cpp
+++ b/src/frontend/mame/ui/ui.cpp
@@ -1215,26 +1215,11 @@ uint32_t mame_ui_manager::handler_ingame(render_container &container)
machine().set_ui_active(!machine().ui_active());
// display a popup indicating the new status
+ std::string const name = machine().input().seq_name(machine().ioport().type_seq(IPT_UI_TOGGLE_UI));
if (machine().ui_active())
- {
- popup_time(2, "%s\n%s\n%s\n%s\n%s\n%s\n",
- _("Keyboard Emulation Status"),
- "-------------------------",
- _("Mode: PARTIAL Emulation"),
- _("UI: Enabled"),
- "-------------------------",
- _("**Use ScrLock to toggle**"));
- }
+ popup_time(2, _("UI controls enabled\nUse %1$s to toggle"), name);
else
- {
- popup_time(2, "%s\n%s\n%s\n%s\n%s\n%s\n",
- _("Keyboard Emulation Status"),
- "-------------------------",
- _("Mode: FULL Emulation"),
- _("UI: Disabled"),
- "-------------------------",
- _("**Use ScrLock to toggle**"));
- }
+ popup_time(2, _("UI controls disabled\nUse %1$s to toggle"), name);
}
}
@@ -1255,7 +1240,8 @@ uint32_t mame_ui_manager::handler_ingame(render_container &container)
if (machine().ui_input().pressed(IPT_UI_TIMECODE))
machine().video().save_input_timecode();
- if (ui_disabled) return ui_disabled;
+ if (ui_disabled)
+ return ui_disabled;
if (machine().ui_input().pressed(IPT_UI_CANCEL))
{