diff options
Diffstat (limited to 'src/emu/ui/ui.cpp')
-rw-r--r-- | src/emu/ui/ui.cpp | 66 |
1 files changed, 8 insertions, 58 deletions
diff --git a/src/emu/ui/ui.cpp b/src/emu/ui/ui.cpp index cc8b18c8154..0b15f24edc6 100644 --- a/src/emu/ui/ui.cpp +++ b/src/emu/ui/ui.cpp @@ -359,9 +359,9 @@ UINT32 ui_manager::set_handler(ui_callback callback, UINT32 param) // various startup screens //------------------------------------------------- -void ui_manager::display_startup_screens(bool first_time, bool show_disclaimer) +void ui_manager::display_startup_screens(bool first_time) { - const int maxstate = 4; + const int maxstate = 3; int str = machine().options().seconds_to_run(); bool show_gameinfo = !machine().options().skip_gameinfo(); bool show_warnings = true, show_mandatory_fileman = true; @@ -370,11 +370,11 @@ void ui_manager::display_startup_screens(bool first_time, bool show_disclaimer) // disable everything if we are using -str for 300 or fewer seconds, or if we're the empty driver, // or if we are debugging if (!first_time || (str > 0 && str < 60*5) || &machine().system() == &GAME_NAME(___empty) || (machine().debug_flags & DEBUG_FLAG_ENABLED) != 0) - show_gameinfo = show_warnings = show_disclaimer = show_mandatory_fileman = FALSE; + show_gameinfo = show_warnings = show_mandatory_fileman = FALSE; #if defined(EMSCRIPTEN) // also disable for the JavaScript port since the startup screens do not run asynchronously - show_gameinfo = show_warnings = show_disclaimer = FALSE; + show_gameinfo = show_warnings = FALSE; #endif // loop over states @@ -388,14 +388,9 @@ void ui_manager::display_startup_screens(bool first_time, bool show_disclaimer) switch (state) { case 0: - if (show_disclaimer && disclaimer_string(messagebox_text).length() > 0) - set_handler(handler_messagebox_ok, 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)) @@ -403,12 +398,12 @@ void ui_manager::display_startup_screens(bool first_time, bool show_disclaimer) } break; - case 2: + case 1: if (show_gameinfo && game_info_astring(messagebox_text).length() > 0) set_handler(handler_messagebox_anykey, 0); break; - case 3: + case 2: if (show_mandatory_fileman && machine().image().mandatory_scan(messagebox_text).length() > 0) { std::string warning; @@ -1033,22 +1028,6 @@ bool ui_manager::show_timecode_total() ***************************************************************************/ //------------------------------------------------- -// disclaimer_string - print the disclaimer -// text to the given buffer -//------------------------------------------------- - -std::string &ui_manager::disclaimer_string(std::string &str) -{ - str = string_format( - _("Usage of emulators in conjunction with ROMs you don't own is forbidden by copyright law.\n\n" - "IF YOU ARE NOT LEGALLY ENTITLED TO PLAY \"%1$s\" ON THIS EMULATOR, PRESS ESC.\n\n" - "Otherwise, type OK or move the joystick left then right to continue"), - machine().system().description); - return str; -} - - -//------------------------------------------------- // warnings_string - print the warning flags // text to the given buffer //------------------------------------------------- @@ -1174,7 +1153,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; } @@ -1317,35 +1296,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 // any keypress |