diff options
author | hap <happppp@users.noreply.github.com> | 2020-07-10 00:22:58 +0200 |
---|---|---|
committer | hap <happppp@users.noreply.github.com> | 2020-07-10 00:22:58 +0200 |
commit | 4ee2f625bb1c3b52fce4be9a259200d4eb6a8d93 (patch) | |
tree | 34d6b82a701618accd409d38f80cd096b55050e5 /src/frontend/mame/ui/info.cpp | |
parent | 890104f33d9685964174b343744a9c8b29b5bc51 (diff) |
ui: able to show emulation warnings from tab menu
Diffstat (limited to 'src/frontend/mame/ui/info.cpp')
-rw-r--r-- | src/frontend/mame/ui/info.cpp | 39 |
1 files changed, 29 insertions, 10 deletions
diff --git a/src/frontend/mame/ui/info.cpp b/src/frontend/mame/ui/info.cpp index 4ed48005057..ec0c6e72700 100644 --- a/src/frontend/mame/ui/info.cpp +++ b/src/frontend/mame/ui/info.cpp @@ -293,10 +293,6 @@ std::string machine_info::warnings_string() const buf << '\n'; } - // add the 'press OK' string - if (!buf.str().empty()) - buf << _("\n\nPress any key to continue"); - return buf.str(); } @@ -451,9 +447,8 @@ std::string machine_info::get_screen_desc(screen_device &screen) const /*------------------------------------------------- - menu_game_info - handle the game information - menu - -------------------------------------------------*/ + menu_game_info - handle the game information menu +-------------------------------------------------*/ menu_game_info::menu_game_info(mame_ui_manager &mui, render_container &container) : menu(mui, container) { @@ -477,9 +472,33 @@ void menu_game_info::handle() /*------------------------------------------------- - menu_image_info - handle the image information - menu - -------------------------------------------------*/ + menu_warn_info - handle the emulation warnings menu +-------------------------------------------------*/ + +menu_warn_info::menu_warn_info(mame_ui_manager &mui, render_container &container) : menu(mui, container) +{ +} + +menu_warn_info::~menu_warn_info() +{ +} + +void menu_warn_info::populate(float &customtop, float &custombottom) +{ + std::string tempstring = ui().machine_info().warnings_string(); + item_append(std::move(tempstring), "", FLAG_MULTILINE, nullptr); +} + +void menu_warn_info::handle() +{ + // process the menu + process(0); +} + + +/*------------------------------------------------- + menu_image_info - handle the image information menu +-------------------------------------------------*/ menu_image_info::menu_image_info(mame_ui_manager &mui, render_container &container) : menu(mui, container) { |