summaryrefslogtreecommitdiffstats
path: root/src/frontend/mame/ui/miscmenu.cpp
diff options
context:
space:
mode:
author Vas Crabb <cuavas@users.noreply.github.com>2021-10-09 12:16:17 +1100
committer GitHub <noreply@github.com>2021-10-09 12:16:17 +1100
commit38082ccbee749d650ccea886ae376a5d1dec337c (patch)
tree9ba9a900ba826bda58832834278025ced17f42f5 /src/frontend/mame/ui/miscmenu.cpp
parent34b3bf701098082feb9077db49987507962c1578 (diff)
Overdue internal UI enhancements (#8674)
* frontend: Added support for message context to localisations. * frontend: Added string_view versions of the message lookup functions. * frontend: Added a few more folder options to the internal UI. * emu/softlist.cpp: Use more appropriate containers. * Switched to Python 3 by default - this will become a requirement. * Updated msgfmt.py for message context support. * frontend: Show all software item info in the internal UI. * frontend: Search alternate titles in software selection menu. * 3rdparty/utf8proc: Updated to v2.6.1 (has several fixes). * frontend: Added software filters for common info fields. * frontend: Allow UI manager to hold onto persistent session data. * frontend: Cache software lists for eight machines. * frontend: Added support for loading localised system names. * frontend: Add UI for selecting localised system names.
Diffstat (limited to 'src/frontend/mame/ui/miscmenu.cpp')
-rw-r--r--src/frontend/mame/ui/miscmenu.cpp25
1 files changed, 24 insertions, 1 deletions
diff --git a/src/frontend/mame/ui/miscmenu.cpp b/src/frontend/mame/ui/miscmenu.cpp
index da7989e6e3b..f053d2572f4 100644
--- a/src/frontend/mame/ui/miscmenu.cpp
+++ b/src/frontend/mame/ui/miscmenu.cpp
@@ -15,6 +15,7 @@
#include "ui/selector.h"
#include "ui/submenu.h"
#include "ui/ui.h"
+#include "ui/utils.h"
#include "infoxml.h"
#include "mame.h"
@@ -702,11 +703,33 @@ void menu_export::populate(float &customtop, float &custombottom)
menu_machine_configure::menu_machine_configure(
mame_ui_manager &mui,
render_container &container,
+ ui_system_info const &info,
+ std::function<void (bool, bool)> &&handler,
+ float x0, float y0)
+ : menu_machine_configure(mui, container, info.description.c_str(), *info.driver, std::move(handler), x0, y0)
+{
+}
+
+menu_machine_configure::menu_machine_configure(
+ mame_ui_manager &mui,
+ render_container &container,
+ game_driver const &drv,
+ std::function<void (bool, bool)> &&handler,
+ float x0, float y0)
+ : menu_machine_configure(mui, container, drv.type.fullname(), drv, std::move(handler), x0, y0)
+{
+}
+
+menu_machine_configure::menu_machine_configure(
+ mame_ui_manager &mui,
+ render_container &container,
+ char const *description,
game_driver const &drv,
std::function<void (bool, bool)> &&handler,
float x0, float y0)
: menu(mui, container)
, m_handler(std::move(handler))
+ , m_description(description)
, m_drv(drv)
, m_x0(x0)
, m_y0(y0)
@@ -835,7 +858,7 @@ void menu_machine_configure::populate(float &customtop, float &custombottom)
void menu_machine_configure::custom_render(void *selectedref, float top, float bottom, float origx1, float origy1, float origx2, float origy2)
{
- char const *const text[] = { _("Configure Machine:"), m_drv.type.fullname() };
+ char const *const text[] = { _("Configure Machine:"), m_description };
draw_text_box(
std::begin(text), std::end(text),
origx1, origx2, origy1 - top, origy1 - ui().box_tb_border(),