From 775777e70bee08014d60a2d1bb90b17f2fe25332 Mon Sep 17 00:00:00 2001 From: Miodrag Milanovic Date: Mon, 28 Mar 2016 08:46:50 +0200 Subject: [PATCH] relaxed warning screen by allowing pressing of any button instead of specific combination (nw) --- src/emu/ui/ui.cpp | 35 +++-------------------------------- src/emu/ui/ui.h | 1 - 2 files changed, 3 insertions(+), 33 deletions(-) diff --git a/src/emu/ui/ui.cpp b/src/emu/ui/ui.cpp index cc8b18c8154..fb7dabe21a0 100644 --- a/src/emu/ui/ui.cpp +++ b/src/emu/ui/ui.cpp @@ -389,13 +389,13 @@ void ui_manager::display_startup_screens(bool first_time, bool show_disclaimer) { case 0: if (show_disclaimer && disclaimer_string(messagebox_text).length() > 0) - set_handler(handler_messagebox_ok, 0); + set_handler(handler_messagebox_anykey, 0); break; case 1: if (show_warnings && warnings_string(messagebox_text).length() > 0) { - set_handler(handler_messagebox_ok, 0); + set_handler(handler_messagebox_anykey, 0); if (machine().system().flags & (MACHINE_WRONG_COLORS | MACHINE_IMPERFECT_COLORS | MACHINE_REQUIRES_ARTWORK | MACHINE_IMPERFECT_GRAPHICS | MACHINE_IMPERFECT_SOUND | MACHINE_IMPERFECT_KEYBOARD | MACHINE_NO_SOUND)) messagebox_backcolor = UI_YELLOW_COLOR; if (machine().system().flags & (MACHINE_NOT_WORKING | MACHINE_UNEMULATED_PROTECTION | MACHINE_MECHANICAL)) @@ -1174,7 +1174,7 @@ std::string &ui_manager::warnings_string(std::string &str) } // add the 'press OK' string - str.append(_("\n\nType OK or move the joystick left then right to continue")); + str.append(_("\n\nPress any key to continue")); return str; } @@ -1316,35 +1316,6 @@ UINT32 ui_manager::handler_messagebox(running_machine &machine, render_container } -//------------------------------------------------- -// handler_messagebox_ok - displays the current -// messagebox_text string and waits for an OK -//------------------------------------------------- - -UINT32 ui_manager::handler_messagebox_ok(running_machine &machine, render_container *container, UINT32 state) -{ - // draw a standard message window - machine.ui().draw_text_box(container, messagebox_text.c_str(), JUSTIFY_LEFT, 0.5f, 0.5f, messagebox_backcolor); - - // an 'O' or left joystick kicks us to the next state - if (state == 0 && (machine.input().code_pressed_once(KEYCODE_O) || machine.ui_input().pressed(IPT_UI_LEFT))) - state++; - - // a 'K' or right joystick exits the state - else if (state == 1 && (machine.input().code_pressed_once(KEYCODE_K) || machine.ui_input().pressed(IPT_UI_RIGHT))) - state = UI_HANDLER_CANCEL; - - // if the user cancels, exit out completely - else if (machine.ui_input().pressed(IPT_UI_CANCEL)) - { - machine.schedule_exit(); - state = UI_HANDLER_CANCEL; - } - - return state; -} - - //------------------------------------------------- // handler_messagebox_anykey - displays the // current messagebox_text string and waits for diff --git a/src/emu/ui/ui.h b/src/emu/ui/ui.h index c50d444120e..fc6be8c3f0f 100644 --- a/src/emu/ui/ui.h +++ b/src/emu/ui/ui.h @@ -218,7 +218,6 @@ private: // UI handlers static UINT32 handler_messagebox(running_machine &machine, render_container *container, UINT32 state); - static UINT32 handler_messagebox_ok(running_machine &machine, render_container *container, UINT32 state); static UINT32 handler_messagebox_anykey(running_machine &machine, render_container *container, UINT32 state); static UINT32 handler_ingame(running_machine &machine, render_container *container, UINT32 state); static UINT32 handler_load_save(running_machine &machine, render_container *container, UINT32 state);