From d45335ec05cfeabb036be8f2d542988bab9cabad Mon Sep 17 00:00:00 2001 From: dankan1890 Date: Sun, 21 Feb 2016 19:55:38 +0100 Subject: ui: more localization and code fix. (nw) --- src/emu/ui/ui.cpp | 112 +++++++++++++++++++++++++++--------------------------- 1 file changed, 56 insertions(+), 56 deletions(-) (limited to 'src/emu/ui/ui.cpp') diff --git a/src/emu/ui/ui.cpp b/src/emu/ui/ui.cpp index 6652bf0b8e8..8a0c7f2549c 100644 --- a/src/emu/ui/ui.cpp +++ b/src/emu/ui/ui.cpp @@ -412,7 +412,7 @@ void ui_manager::display_startup_screens(bool first_time, bool show_disclaimer) if (show_mandatory_fileman && machine().image().mandatory_scan(messagebox_text).length() > 0) { std::string warning; - warning.assign("This driver requires images to be loaded in the following device(s): ").append(messagebox_text.substr(0, messagebox_text.length() - 2)); + warning.assign(_("This driver requires images to be loaded in the following device(s): ")).append(messagebox_text.substr(0, messagebox_text.length() - 2)); ui_menu_file_manager::force_file_manager(machine(), &machine().render().ui_container(), warning.c_str()); } break; @@ -1059,9 +1059,9 @@ bool ui_manager::show_timecode_total() std::string &ui_manager::disclaimer_string(std::string &str) { - str.assign("Usage of emulators in conjunction with ROMs you don't own is forbidden by copyright law.\n\n"); - strcatprintf(str, "IF YOU ARE NOT LEGALLY ENTITLED TO PLAY \"%s\" ON THIS EMULATOR, PRESS ESC.\n\n", machine().system().description); - str.append("Otherwise, type OK or move the joystick left then right to continue"); + str.assign(_("Usage of emulators in conjunction with ROMs you don't own is forbidden by copyright law.\n\n")); + strcatprintf(str, _("IF YOU ARE NOT LEGALLY ENTITLED TO PLAY \"%s\" ON THIS EMULATOR, PRESS ESC.\n\n"), machine().system().description); + str.append(_("Otherwise, type OK or move the joystick left then right to continue")); return str; } @@ -1096,7 +1096,7 @@ std::string &ui_manager::warnings_string(std::string &str) // add a warning if any ROMs were loaded with warnings if (machine().rom_load().warnings() > 0) { - str.append("One or more ROMs/CHDs for this machine are incorrect. The machine may not run correctly.\n"); + str.append(_("One or more ROMs/CHDs for this machine are incorrect. The machine may not run correctly.\n")); if (machine().system().flags & WARNING_FLAGS) str.append("\n"); } @@ -1109,42 +1109,42 @@ std::string &ui_manager::warnings_string(std::string &str) // if we have at least one warning flag, print the general header if ((machine().system().flags & WARNING_FLAGS) || machine().rom_load().knownbad() > 0) { - str.append("There are known problems with this machine\n\n"); + str.append(_("There are known problems with this machine\n\n")); // add a warning if any ROMs are flagged BAD_DUMP/NO_DUMP if (machine().rom_load().knownbad() > 0) { - str.append("One or more ROMs/CHDs for this machine have not been correctly dumped.\n"); + str.append(_("One or more ROMs/CHDs for this machine have not been correctly dumped.\n")); } // add one line per warning flag if (machine().system().flags & MACHINE_IMPERFECT_KEYBOARD) - str.append("The keyboard emulation may not be 100% accurate.\n"); + str.append(_("The keyboard emulation may not be 100% accurate.\n")); if (machine().system().flags & MACHINE_IMPERFECT_COLORS) - str.append("The colors aren't 100% accurate.\n"); + str.append(_("The colors aren't 100% accurate.\n")); if (machine().system().flags & MACHINE_WRONG_COLORS) - str.append("The colors are completely wrong.\n"); + str.append(_("The colors are completely wrong.\n")); if (machine().system().flags & MACHINE_IMPERFECT_GRAPHICS) - str.append("The video emulation isn't 100% accurate.\n"); + str.append(_("The video emulation isn't 100% accurate.\n")); if (machine().system().flags & MACHINE_IMPERFECT_SOUND) - str.append("The sound emulation isn't 100% accurate.\n"); + str.append(_("The sound emulation isn't 100% accurate.\n")); if (machine().system().flags & MACHINE_NO_SOUND) { - str.append("The machine lacks sound.\n"); + str.append(_("The machine lacks sound.\n")); } if (machine().system().flags & MACHINE_NO_COCKTAIL) - str.append("Screen flipping in cocktail mode is not supported.\n"); + str.append(_("Screen flipping in cocktail mode is not supported.\n")); // check if external artwork is present before displaying this warning? if (machine().system().flags & MACHINE_REQUIRES_ARTWORK) { - str.append("The machine requires external artwork files\n"); + str.append(_("The machine requires external artwork files\n")); } if (machine().system().flags & MACHINE_IS_INCOMPLETE ) { - str.append("This machine was never completed. It may exhibit strange behavior or missing elements that are not bugs in the emulation.\n"); + str.append(_("This machine was never completed. It may exhibit strange behavior or missing elements that are not bugs in the emulation.\n")); } if (machine().system().flags & MACHINE_NO_SOUND_HW ) { - str.append("This machine has no sound hardware, MAME will produce no sounds, this is expected behaviour.\n"); + str.append(_("This machine has no sound hardware, MAME will produce no sounds, this is expected behaviour.\n")); } // if there's a NOT WORKING, UNEMULATED PROTECTION or GAME MECHANICAL warning, make it stronger @@ -1152,15 +1152,15 @@ std::string &ui_manager::warnings_string(std::string &str) { // add the strings for these warnings if (machine().system().flags & MACHINE_UNEMULATED_PROTECTION) { - str.append("The machine has protection which isn't fully emulated.\n"); + str.append(_("The machine has protection which isn't fully emulated.\n")); } if (machine().system().flags & MACHINE_NOT_WORKING) { - str.append("\nTHIS MACHINE DOESN'T WORK. The emulation for this machine is not yet complete. " - "There is nothing you can do to fix this problem except wait for the developers to improve the emulation.\n"); + str.append(_("\nTHIS MACHINE DOESN'T WORK. The emulation for this machine is not yet complete. " + "There is nothing you can do to fix this problem except wait for the developers to improve the emulation.\n")); } if (machine().system().flags & MACHINE_MECHANICAL) { - str.append("\nCertain elements of this machine cannot be emulated as it requires actual physical interaction or consists of mechanical devices. " - "It is not possible to fully play this machine.\n"); + str.append(_("\nCertain elements of this machine cannot be emulated as it requires actual physical interaction or consists of mechanical devices. " + "It is not possible to fully play this machine.\n")); } // find the parent of this driver @@ -1178,7 +1178,7 @@ std::string &ui_manager::warnings_string(std::string &str) { // this one works, add a header and display the name of the clone if (!foundworking) { - str.append("\n\nThere are working clones of this machine: "); + str.append(_("\n\nThere are working clones of this machine: ")); } else str.append(", "); @@ -1192,7 +1192,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\nType OK or move the joystick left then right to continue")); return str; } @@ -1251,7 +1251,7 @@ std::string &ui_manager::game_info_astring(std::string &str) // append the Sound: string if (!found_sound) - str.append("\nSound:\n"); + str.append(_("\nSound:\n")); found_sound = true; // count how many identical sound chips we have @@ -1279,11 +1279,11 @@ std::string &ui_manager::game_info_astring(std::string &str) } // display screen information - str.append("\nVideo:\n"); + str.append(_("\nVideo:\n")); screen_device_iterator scriter(machine().root_device()); int scrcount = scriter.count(); if (scrcount == 0) - str.append("None\n"); + str.append(_("None\n")); else { for (screen_device *screen = scriter.first(); screen != nullptr; screen = scriter.next()) @@ -1295,7 +1295,7 @@ std::string &ui_manager::game_info_astring(std::string &str) } if (screen->screen_type() == SCREEN_TYPE_VECTOR) - str.append("Vector\n"); + str.append(_("Vector\n")); else { const rectangle &visarea = screen->visible_area(); @@ -1587,22 +1587,22 @@ UINT32 ui_manager::handler_ingame(running_machine &machine, render_container *co if (machine.ui_active()) { machine.ui().popup_time(2, "%s\n%s\n%s\n%s\n%s\n%s\n", - "Keyboard Emulation Status", + _("Keyboard Emulation Status"), "-------------------------", - "Mode: PARTIAL Emulation", - "UI: Enabled", + _("Mode: PARTIAL Emulation"), + _("UI: Enabled"), "-------------------------", - "**Use ScrLock to toggle**"); + _("**Use ScrLock to toggle**")); } else { machine.ui().popup_time(2, "%s\n%s\n%s\n%s\n%s\n%s\n", - "Keyboard Emulation Status", + _("Keyboard Emulation Status"), "-------------------------", - "Mode: FULL Emulation", - "UI: Disabled", + _("Mode: FULL Emulation"), + _("UI: Disabled"), "-------------------------", - "**Use ScrLock to toggle**"); + _("**Use ScrLock to toggle**")); } } } @@ -1746,13 +1746,13 @@ UINT32 ui_manager::handler_ingame(running_machine &machine, render_container *co { if (!machine.options().cheat()) { - machine.popmessage("Autofire can't be enabled"); + machine.popmessage(_("Autofire can't be enabled")); } else { bool autofire_toggle = machine.ioport().get_autofire_toggle(); machine.ioport().set_autofire_toggle(!autofire_toggle); - machine.popmessage("Autofire %s", autofire_toggle ? "Enabled" : "Disabled"); + machine.popmessage("Autofire %s", autofire_toggle ? _("Enabled") : _("Disabled")); } } @@ -1785,9 +1785,9 @@ UINT32 ui_manager::handler_load_save(running_machine &machine, render_container // okay, we're waiting for a key to select a slot; display a message if (state == LOADSAVE_SAVE) - machine.ui().draw_message_window(container, "Select position to save to"); + machine.ui().draw_message_window(container, _("Select position to save to")); else - machine.ui().draw_message_window(container, "Select position to load from"); + machine.ui().draw_message_window(container, _("Select position to load from")); // if load/save state sequence is still being pressed, do not read the filename yet if (machine.ui().m_load_save_hold) { @@ -1811,9 +1811,9 @@ UINT32 ui_manager::handler_load_save(running_machine &machine, render_container { // display a popup indicating things were cancelled if (state == LOADSAVE_SAVE) - machine.popmessage("Save cancelled"); + machine.popmessage(_("Save cancelled")); else - machine.popmessage("Load cancelled"); + machine.popmessage(_("Load cancelled")); // reset the state machine.resume(); @@ -1856,12 +1856,12 @@ UINT32 ui_manager::handler_load_save(running_machine &machine, render_container // display a popup indicating that the save will proceed if (state == LOADSAVE_SAVE) { - machine.popmessage("Save to position %s", filename); + machine.popmessage(_("Save to position %s"), filename); machine.schedule_save(filename); } else { - machine.popmessage("Load from position %s", filename); + machine.popmessage(_("Load from position %s"), filename); machine.schedule_load(filename); } @@ -1901,9 +1901,9 @@ UINT32 ui_manager::handler_confirm_quit(running_machine &machine, render_contain std::string ui_cancel_text = machine.input().seq_name(machine.ioport().type_seq(IPT_UI_CANCEL, 0, SEQ_TYPE_STANDARD)); // assemble the quit message - std::string quit_message = strformat("Are you sure you want to quit?\n\n" + std::string quit_message = strformat(_("Are you sure you want to quit?\n\n" "Press ''%s'' to quit,\n" - "Press ''%s'' to return to emulation.", + "Press ''%s'' to return to emulation."), ui_select_text.c_str(), ui_cancel_text.c_str()); @@ -1977,7 +1977,7 @@ static slider_state *slider_init(running_machine &machine) int item; // add overall volume - *tailptr = slider_alloc(machine, "Master Volume", -32, 0, 0, 1, slider_volume, nullptr); + *tailptr = slider_alloc(machine, _("Master Volume"), -32, 0, 0, 1, slider_volume, nullptr); tailptr = &(*tailptr)->next; // add per-channel volume @@ -1988,7 +1988,7 @@ static slider_state *slider_init(running_machine &machine) INT32 defval = 1000; str.assign(info.stream->input_name(info.inputnum)); - str.append(" Volume"); + str.append(_(" Volume")); *tailptr = slider_alloc(machine, str.c_str(), 0, defval, maxval, 20, slider_mixervol, (void *)(FPTR)item); tailptr = &(*tailptr)->next; } @@ -2091,13 +2091,13 @@ static slider_state *slider_init(running_machine &machine) if (screen->screen_type() == SCREEN_TYPE_VECTOR) { // add vector control - *tailptr = slider_alloc(machine, "Vector Flicker", 0, 0, 1000, 10, slider_flicker, nullptr); + *tailptr = slider_alloc(machine, _("Vector Flicker"), 0, 0, 1000, 10, slider_flicker, nullptr); tailptr = &(*tailptr)->next; - *tailptr = slider_alloc(machine, "Beam Width Minimum", 1, 100, 1000, 1, slider_beam_width_min, nullptr); + *tailptr = slider_alloc(machine, _("Beam Width Minimum"), 1, 100, 1000, 1, slider_beam_width_min, nullptr); tailptr = &(*tailptr)->next; - *tailptr = slider_alloc(machine, "Beam Width Maximum", 1, 100, 1000, 1, slider_beam_width_max, nullptr); + *tailptr = slider_alloc(machine, _("Beam Width Maximum"), 1, 100, 1000, 1, slider_beam_width_max, nullptr); tailptr = &(*tailptr)->next; - *tailptr = slider_alloc(machine, "Beam Intensity Weight", -1000, 0, 1000, 10, slider_beam_intensity_weight, nullptr); + *tailptr = slider_alloc(machine, _("Beam Intensity Weight"), -1000, 0, 1000, 10, slider_beam_intensity_weight, nullptr); tailptr = &(*tailptr)->next; break; } @@ -2537,9 +2537,9 @@ static char *slider_get_screen_desc(screen_device &screen) static char descbuf[256]; if (scrcount > 1) - sprintf(descbuf, "Screen '%s'", screen.tag()); + sprintf(descbuf, _("Screen '%s'"), screen.tag()); else - strcpy(descbuf, "Screen"); + strcpy(descbuf, _("Screen")); return descbuf; } @@ -2557,7 +2557,7 @@ static INT32 slider_crossscale(running_machine &machine, void *arg, std::string if (newval != SLIDER_NOCHANGE) field->set_crosshair_scale(float(newval) * 0.001); if (str != nullptr) - strprintf(*str,"%s %s %1.3f", "Crosshair Scale", (field->crosshair_axis() == CROSSHAIR_AXIS_X) ? "X" : "Y", float(newval) * 0.001f); + strprintf(*str,"%s %s %1.3f", _("Crosshair Scale"), (field->crosshair_axis() == CROSSHAIR_AXIS_X) ? "X" : "Y", float(newval) * 0.001f); return floor(field->crosshair_scale() * 1000.0f + 0.5f); } #endif @@ -2576,7 +2576,7 @@ static INT32 slider_crossoffset(running_machine &machine, void *arg, std::string if (newval != SLIDER_NOCHANGE) field->set_crosshair_offset(float(newval) * 0.001f); if (str != nullptr) - strprintf(*str,"%s %s %1.3f", "Crosshair Offset", (field->crosshair_axis() == CROSSHAIR_AXIS_X) ? "X" : "Y", float(newval) * 0.001f); + strprintf(*str,"%s %s %1.3f", _("Crosshair Offset"), (field->crosshair_axis() == CROSSHAIR_AXIS_X) ? "X" : "Y", float(newval) * 0.001f); return field->crosshair_offset(); } #endif -- cgit v1.2.3-70-g09d2 From b2a230cd150d4e03ef278def20e4f594ea0412d7 Mon Sep 17 00:00:00 2001 From: Miodrag Milanovic Date: Mon, 22 Feb 2016 09:14:49 +0100 Subject: placing back UI related settings to emu_options on popular demand (nw) --- src/emu/emuopts.cpp | 4 ++++ src/emu/emuopts.h | 11 +++++++++++ src/emu/ui/custui.cpp | 5 +++-- src/emu/ui/miscmenu.cpp | 4 ++-- src/emu/ui/moptions.cpp | 4 ---- src/emu/ui/moptions.h | 11 ----------- src/emu/ui/ui.cpp | 8 ++++---- 7 files changed, 24 insertions(+), 23 deletions(-) (limited to 'src/emu/ui/ui.cpp') diff --git a/src/emu/emuopts.cpp b/src/emu/emuopts.cpp index ccb7c5d9487..1fb827ed1a6 100644 --- a/src/emu/emuopts.cpp +++ b/src/emu/emuopts.cpp @@ -183,8 +183,12 @@ const options_entry emu_options::s_option_entries[] = { OPTION_DRC_LOG_NATIVE, "0", OPTION_BOOLEAN, "write DRC native disassembly log" }, { OPTION_BIOS, nullptr, OPTION_STRING, "select the system BIOS to use" }, { OPTION_CHEAT ";c", "0", OPTION_BOOLEAN, "enable cheat subsystem" }, + { OPTION_SKIP_GAMEINFO, "0", OPTION_BOOLEAN, "skip displaying the information screen at startup" }, + { OPTION_UI_FONT, "default", OPTION_STRING, "specify a font to use" }, { OPTION_UI, "cabinet", OPTION_STRING, "type of UI (simple|cabinet)" }, { OPTION_RAMSIZE ";ram", nullptr, OPTION_STRING, "size of RAM (if supported by driver)" }, + { OPTION_CONFIRM_QUIT, "0", OPTION_BOOLEAN, "display confirm quit screen on exit" }, + { OPTION_UI_MOUSE, "1", OPTION_BOOLEAN, "display ui mouse cursor" }, { OPTION_AUTOBOOT_COMMAND ";ab", nullptr, OPTION_STRING, "command to execute after machine boot" }, { OPTION_AUTOBOOT_DELAY, "2", OPTION_INTEGER, "timer delay in sec to trigger command execution on autoboot" }, { OPTION_AUTOBOOT_SCRIPT ";script", nullptr, OPTION_STRING, "lua script to execute after machine boot" }, diff --git a/src/emu/emuopts.h b/src/emu/emuopts.h index c0aefb6ac28..85e054a4c43 100644 --- a/src/emu/emuopts.h +++ b/src/emu/emuopts.h @@ -176,6 +176,8 @@ enum #define OPTION_DRC_LOG_NATIVE "drc_log_native" #define OPTION_BIOS "bios" #define OPTION_CHEAT "cheat" +#define OPTION_SKIP_GAMEINFO "skip_gameinfo" +#define OPTION_UI_FONT "uifont" #define OPTION_UI "ui" #define OPTION_RAMSIZE "ramsize" @@ -185,6 +187,9 @@ enum #define OPTION_COMM_REMOTE_HOST "comm_remotehost" #define OPTION_COMM_REMOTE_PORT "comm_remoteport" +#define OPTION_CONFIRM_QUIT "confirm_quit" +#define OPTION_UI_MOUSE "ui_mouse" + #define OPTION_AUTOBOOT_COMMAND "autoboot_command" #define OPTION_AUTOBOOT_DELAY "autoboot_delay" #define OPTION_AUTOBOOT_SCRIPT "autoboot_script" @@ -353,6 +358,8 @@ public: bool drc_log_native() const { return bool_value(OPTION_DRC_LOG_NATIVE); } const char *bios() const { return value(OPTION_BIOS); } bool cheat() const { return bool_value(OPTION_CHEAT); } + bool skip_gameinfo() const { return bool_value(OPTION_SKIP_GAMEINFO); } + const char *ui_font() const { return value(OPTION_UI_FONT); } const char *ui() const { return value(OPTION_UI); } const char *ram_size() const { return value(OPTION_RAMSIZE); } @@ -362,6 +369,10 @@ public: const char *comm_remotehost() const { return value(OPTION_COMM_REMOTE_HOST); } const char *comm_remoteport() const { return value(OPTION_COMM_REMOTE_PORT); } + + bool confirm_quit() const { return bool_value(OPTION_CONFIRM_QUIT); } + bool ui_mouse() const { return bool_value(OPTION_UI_MOUSE); } + const char *autoboot_command() const { return value(OPTION_AUTOBOOT_COMMAND); } int autoboot_delay() const { return int_value(OPTION_AUTOBOOT_DELAY); } const char *autoboot_script() const { return value(OPTION_AUTOBOOT_SCRIPT); } diff --git a/src/emu/ui/custui.cpp b/src/emu/ui/custui.cpp index 4b8cb58dd0d..6492faebabf 100644 --- a/src/emu/ui/custui.cpp +++ b/src/emu/ui/custui.cpp @@ -192,7 +192,7 @@ ui_menu_font_ui::ui_menu_font_ui(running_machine &machine, render_container *con ui_options &moptions = machine.ui().options(); #ifdef UI_WINDOWS - std::string name(machine.ui().options().ui_font()); + std::string name(machine.options().ui_font()); list(); m_bold = (strreplace(name, "[B]", "") + strreplace(name, "[b]", "") > 0); @@ -285,7 +285,8 @@ ui_menu_font_ui::~ui_menu_font_ui() if (m_bold) name.insert(0, "[B]"); } - moptions.set_value(OPTION_UI_FONT, name.c_str(), OPTION_PRIORITY_CMDLINE, error_string); + machine().options().set_value(OPTION_UI_FONT, name.c_str(), OPTION_PRIORITY_CMDLINE, error_string); + machine().options().mark_changed(OPTION_UI_FONT); #endif moptions.set_value(OPTION_INFOS_SIZE, m_info_size, OPTION_PRIORITY_CMDLINE, error_string); diff --git a/src/emu/ui/miscmenu.cpp b/src/emu/ui/miscmenu.cpp index 0c996640167..5d232729bd2 100644 --- a/src/emu/ui/miscmenu.cpp +++ b/src/emu/ui/miscmenu.cpp @@ -564,8 +564,8 @@ ui_menu_misc_options::misc_option ui_menu_misc_options::m_options[] = { { 0, __("DATs info"), OPTION_DATS_ENABLED }, { 0, __("Cheats"), OPTION_CHEAT }, { 0, __("Show mouse pointer"), OPTION_UI_MOUSE }, - { 0, __("Confirm quit from machines"), OPTION_UI_CONFIRM_QUIT }, - { 0, __("Skip displaying information's screen at startup"), OPTION_UI_SKIP_GAMEINFO }, + { 0, __("Confirm quit from machines"), OPTION_CONFIRM_QUIT }, + { 0, __("Skip displaying information's screen at startup"), OPTION_SKIP_GAMEINFO }, { 0, __("Force 4:3 appearance for software snapshot"), OPTION_FORCED4X3 }, { 0, __("Use image as background"), OPTION_USE_BACKGROUND }, { 0, __("Skip bios selection menu"), OPTION_SKIP_BIOS_MENU }, diff --git a/src/emu/ui/moptions.cpp b/src/emu/ui/moptions.cpp index dd4897749fc..63c51d26438 100644 --- a/src/emu/ui/moptions.cpp +++ b/src/emu/ui/moptions.cpp @@ -52,10 +52,6 @@ const options_entry ui_options::s_option_entries[] = { OPTION_LAST_USED_FILTER, "", OPTION_STRING, "latest used filter" }, { OPTION_LAST_USED_MACHINE, "", OPTION_STRING, "latest used machine" }, { OPTION_INFO_AUTO_AUDIT, "0", OPTION_BOOLEAN, "enable auto audit in the general info panel" }, - { OPTION_UI_SKIP_GAMEINFO, "0", OPTION_BOOLEAN, "skip displaying the information screen at startup" }, - { OPTION_UI_FONT, "default", OPTION_STRING, "specify a font to use" }, - { OPTION_UI_CONFIRM_QUIT, "0", OPTION_BOOLEAN, "display confirm quit screen on exit" }, - { OPTION_UI_MOUSE, "1", OPTION_BOOLEAN, "display ui mouse cursor" }, // UI options { nullptr, nullptr, OPTION_HEADER, "UI OPTIONS" }, diff --git a/src/emu/ui/moptions.h b/src/emu/ui/moptions.h index 3b1ab8948c0..9706dcda7f5 100644 --- a/src/emu/ui/moptions.h +++ b/src/emu/ui/moptions.h @@ -70,12 +70,6 @@ #define OPTION_UI_DIPSW_COLOR "ui_dipsw_color" #define OPTION_UI_SLIDER_COLOR "ui_slider_color" -#define OPTION_UI_FONT "uifont" -#define OPTION_UI_CONFIRM_QUIT "confirm_quit" -#define OPTION_UI_MOUSE "ui_mouse" -#define OPTION_UI_SKIP_GAMEINFO "skip_gameinfo" - - class ui_options : public core_options { public: @@ -136,11 +130,6 @@ public: const char *ui_mousedown_bg_color() const { return value(OPTION_UI_MOUSEDOWN_BG_COLOR); } const char *ui_dipsw_color() const { return value(OPTION_UI_DIPSW_COLOR); } const char *ui_slider_color() const { return value(OPTION_UI_SLIDER_COLOR); } - - bool skip_gameinfo() const { return bool_value(OPTION_UI_SKIP_GAMEINFO); } - const char *ui_font() const { return value(OPTION_UI_FONT); } - bool confirm_quit() const { return bool_value(OPTION_UI_CONFIRM_QUIT); } - bool ui_mouse() const { return bool_value(OPTION_UI_MOUSE); } private: static const options_entry s_option_entries[]; }; diff --git a/src/emu/ui/ui.cpp b/src/emu/ui/ui.cpp index 8a0c7f2549c..f3ce51feea6 100644 --- a/src/emu/ui/ui.cpp +++ b/src/emu/ui/ui.cpp @@ -363,7 +363,7 @@ void ui_manager::display_startup_screens(bool first_time, bool show_disclaimer) { const int maxstate = 4; int str = machine().options().seconds_to_run(); - bool show_gameinfo = !machine().ui().options().skip_gameinfo(); + bool show_gameinfo = !machine().options().skip_gameinfo(); bool show_warnings = true, show_mandatory_fileman = true; int state; @@ -499,7 +499,7 @@ void ui_manager::update_and_render(render_container *container) m_popup_text_end = 0; // display the internal mouse cursor - if (m_mouse_show || (is_menu_active() && machine().ui().options().ui_mouse())) + if (m_mouse_show || (is_menu_active() && machine().options().ui_mouse())) { INT32 mouse_target_x, mouse_target_y; bool mouse_button; @@ -530,7 +530,7 @@ render_font *ui_manager::get_font() { // allocate the font and messagebox string if (m_font == nullptr) - m_font = machine().render().font_alloc(machine().ui().options().ui_font()); + m_font = machine().render().font_alloc(machine().options().ui_font()); return m_font; } @@ -1880,7 +1880,7 @@ UINT32 ui_manager::handler_load_save(running_machine &machine, render_container void ui_manager::request_quit() { - if (!machine().ui().options().confirm_quit()) + if (!machine().options().confirm_quit()) machine().schedule_exit(); else set_handler(handler_confirm_quit, 0); -- cgit v1.2.3-70-g09d2