Previous 199869 Revisions Next

r45106 Sunday 21st February, 2016 at 15:38:05 UTC by Dankan1890
ui: localization part1. (nw)
[src/emu/ui]custui.cpp datmenu.cpp dirmenu.cpp dsplmenu.cpp miscmenu.cpp optsmenu.cpp selector.cpp selgame.cpp selsoft.cpp simpleselgame.cpp slotopt.cpp sndmenu.cpp

trunk/src/emu/ui/custui.cpp
r253617r253618
2929   const char *lang = machine.options().language();
3030   const osd_directory_entry *dirent;
3131   int cnt = 0;
32   for (int x = 0; (dirent = path.next()) != nullptr; ++x)
32   while ((dirent = path.next()) != nullptr)
3333      if (dirent->type == ENTTYPE_DIR && strcmp(dirent->name, ".") != 0 && strcmp(dirent->name, "..") != 0)
3434      {
3535         auto name = std::string(dirent->name);
r253617r253618
130130void ui_menu_custom_ui::populate()
131131{
132132   UINT32 arrow_flags;
133   item_append("Fonts", nullptr, 0, (void *)(FPTR)FONT_MENU);
134   item_append("Colors", nullptr, 0, (void *)(FPTR)COLORS_MENU);
133   item_append(_("Fonts"), nullptr, 0, (void *)(FPTR)FONT_MENU);
134   item_append(_("Colors"), nullptr, 0, (void *)(FPTR)COLORS_MENU);
135135
136136   if (!m_lang.empty())
137137   {
138138      arrow_flags = get_arrow_flags(0, m_lang.size() - 1, m_currlang);
139      item_append("Language", m_lang[m_currlang].c_str(), arrow_flags, (void *)(FPTR)LANGUAGE_MENU);
139      item_append(_("Language"), m_lang[m_currlang].c_str(), arrow_flags, (void *)(FPTR)LANGUAGE_MENU);
140140   }
141141
142142   arrow_flags = get_arrow_flags(0, (int)HIDE_BOTH, ui_globals::panels_status);
143   item_append("Show side panels", hide_status[ui_globals::panels_status], arrow_flags, (void *)(FPTR)HIDE_MENU);
143   item_append(_("Show side panels"), hide_status[ui_globals::panels_status], arrow_flags, (void *)(FPTR)HIDE_MENU);
144144
145145   item_append(MENU_SEPARATOR_ITEM, nullptr, 0, nullptr);
146146   customtop = machine().ui().get_line_height() + 3.0f * UI_BOX_TB_BORDER;
r253617r253618
155155   float width;
156156   ui_manager &mui = machine().ui();
157157
158   mui.draw_text_full(container, "Custom UI Settings", 0.0f, 0.0f, 1.0f, JUSTIFY_CENTER, WRAP_TRUNCATE,
158   mui.draw_text_full(container, _("Custom UI Settings"), 0.0f, 0.0f, 1.0f, JUSTIFY_CENTER, WRAP_TRUNCATE,
159159                                 DRAW_NONE, ARGB_WHITE, ARGB_BLACK, &width, nullptr);
160160   width += 2 * UI_BOX_LR_BORDER;
161161   float maxwidth = MAX(origx2 - origx1, width);
r253617r253618
175175   y1 += UI_BOX_TB_BORDER;
176176
177177   // draw the text within it
178   mui.draw_text_full(container, "Custom UI Settings", x1, y1, x2 - x1, JUSTIFY_CENTER, WRAP_TRUNCATE,
178   mui.draw_text_full(container, _("Custom UI Settings"), x1, y1, x2 - x1, JUSTIFY_CENTER, WRAP_TRUNCATE,
179179                                 DRAW_NORMAL, UI_TEXT_COLOR, UI_TEXT_BG_COLOR, nullptr, nullptr);
180180}
181181
r253617r253618
362362   // add fonts option
363363   arrow_flags = get_arrow_flags(0, m_fonts.size() - 1, m_actual);
364364   std::string name(m_fonts[m_actual]);
365   item_append("UI Font", name.c_str(), arrow_flags, (void *)(FPTR)MUI_FNT);
365   item_append(_("UI Font"), name.c_str(), arrow_flags, (void *)(FPTR)MUI_FNT);
366366
367367   if (name != "default")
368368   {
369      item_append("Bold", m_bold ? "On" : "Off", m_bold ? MENU_FLAG_RIGHT_ARROW : MENU_FLAG_LEFT_ARROW, (void *)(FPTR)MUI_BOLD);
370      item_append("Italic", m_italic ? "On" : "Off", m_italic ? MENU_FLAG_RIGHT_ARROW : MENU_FLAG_LEFT_ARROW, (void *)(FPTR)MUI_ITALIC);
369      item_append(_("Bold"), m_bold ? "On" : "Off", m_bold ? MENU_FLAG_RIGHT_ARROW : MENU_FLAG_LEFT_ARROW, (void *)(FPTR)MUI_BOLD);
370      item_append(_("Italic"), m_italic ? "On" : "Off", m_italic ? MENU_FLAG_RIGHT_ARROW : MENU_FLAG_LEFT_ARROW, (void *)(FPTR)MUI_ITALIC);
371371   }
372372#endif
373373
374374   arrow_flags = get_arrow_flags(m_font_min, m_font_max, m_font_size);
375375   strprintf(tmptxt, "%2d", m_font_size);
376   item_append("Lines", tmptxt.c_str(), arrow_flags, (void *)(FPTR)FONT_SIZE);
376   item_append(_("Lines"), tmptxt.c_str(), arrow_flags, (void *)(FPTR)FONT_SIZE);
377377
378378   item_append(MENU_SEPARATOR_ITEM, nullptr, 0, nullptr);
379379
r253617r253618
381381   tmptxt.clear();
382382   strprintf(tmptxt, "%3.2f", m_info_size);
383383   arrow_flags = get_arrow_flags(m_info_min, m_info_max, m_info_size);
384   item_append("Infos text size", tmptxt.c_str(), arrow_flags, (void *)(FPTR)INFOS_SIZE);
384   item_append(_("Infos text size"), tmptxt.c_str(), arrow_flags, (void *)(FPTR)INFOS_SIZE);
385385
386386   item_append(MENU_SEPARATOR_ITEM, nullptr, 0, nullptr);
387387
r253617r253618
398398   ui_manager &mui = machine().ui();
399399
400400   // top text
401   std::string topbuf("UI Fonts Settings");
401   std::string topbuf(_("UI Fonts Settings"));
402402
403403   mui.draw_text_full(container, topbuf.c_str(), 0.0f, 0.0f, 1.0f, JUSTIFY_CENTER, WRAP_TRUNCATE,
404404                                 DRAW_NONE, ARGB_WHITE, ARGB_BLACK, &width, nullptr);
r253617r253618
425425
426426   if ((FPTR)selectedref == INFOS_SIZE)
427427   {
428      topbuf = "Sample text - Lorem ipsum dolor sit amet, consectetur adipiscing elit.";
428      topbuf = _("Sample text - Lorem ipsum dolor sit amet, consectetur adipiscing elit.");
429429
430430      mui.draw_text_full(container, topbuf.c_str(), 0.0f, 0.0f, 1.0f, JUSTIFY_LEFT, WRAP_NEVER,
431431                                    DRAW_NONE, ARGB_WHITE, ARGB_BLACK, &width, nullptr, m_info_size);
r253617r253618
523523
524524void ui_menu_colors_ui::populate()
525525{
526   item_append("Normal text", nullptr, 0, (void *)(FPTR)MUI_TEXT_COLOR);
527   item_append("Selected color", nullptr, 0, (void *)(FPTR)MUI_SELECTED_COLOR);
528   item_append("Normal text background", nullptr, 0, (void *)(FPTR)MUI_TEXT_BG_COLOR);
529   item_append("Selected background color", nullptr, 0, (void *)(FPTR)MUI_SELECTED_BG_COLOR);
530   item_append("Subitem color", nullptr, 0, (void *)(FPTR)MUI_SUBITEM_COLOR);
531   item_append("Clone", nullptr, 0, (void *)(FPTR)MUI_CLONE_COLOR);
532   item_append("Border", nullptr, 0, (void *)(FPTR)MUI_BORDER_COLOR);
533   item_append("Background", nullptr, 0, (void *)(FPTR)MUI_BACKGROUND_COLOR);
534   item_append("Dipswitch", nullptr, 0, (void *)(FPTR)MUI_DIPSW_COLOR);
535   item_append("Unavailable color", nullptr, 0, (void *)(FPTR)MUI_UNAVAILABLE_COLOR);
536   item_append("Slider color", nullptr, 0, (void *)(FPTR)MUI_SLIDER_COLOR);
537   item_append("Gfx viewer background", nullptr, 0, (void *)(FPTR)MUI_GFXVIEWER_BG_COLOR);
538   item_append("Mouse over color", nullptr, 0, (void *)(FPTR)MUI_MOUSEOVER_COLOR);
539   item_append("Mouse over background color", nullptr, 0, (void *)(FPTR)MUI_MOUSEOVER_BG_COLOR);
540   item_append("Mouse down color", nullptr, 0, (void *)(FPTR)MUI_MOUSEDOWN_COLOR);
541   item_append("Mouse down background color", nullptr, 0, (void *)(FPTR)MUI_MOUSEDOWN_BG_COLOR);
526   item_append(_("Normal text"), nullptr, 0, (void *)(FPTR)MUI_TEXT_COLOR);
527   item_append(_("Selected color"), nullptr, 0, (void *)(FPTR)MUI_SELECTED_COLOR);
528   item_append(_("Normal text background"), nullptr, 0, (void *)(FPTR)MUI_TEXT_BG_COLOR);
529   item_append(_("Selected background color"), nullptr, 0, (void *)(FPTR)MUI_SELECTED_BG_COLOR);
530   item_append(_("Subitem color"), nullptr, 0, (void *)(FPTR)MUI_SUBITEM_COLOR);
531   item_append(_("Clone"), nullptr, 0, (void *)(FPTR)MUI_CLONE_COLOR);
532   item_append(_("Border"), nullptr, 0, (void *)(FPTR)MUI_BORDER_COLOR);
533   item_append(_("Background"), nullptr, 0, (void *)(FPTR)MUI_BACKGROUND_COLOR);
534   item_append(_("Dipswitch"), nullptr, 0, (void *)(FPTR)MUI_DIPSW_COLOR);
535   item_append(_("Unavailable color"), nullptr, 0, (void *)(FPTR)MUI_UNAVAILABLE_COLOR);
536   item_append(_("Slider color"), nullptr, 0, (void *)(FPTR)MUI_SLIDER_COLOR);
537   item_append(_("Gfx viewer background"), nullptr, 0, (void *)(FPTR)MUI_GFXVIEWER_BG_COLOR);
538   item_append(_("Mouse over color"), nullptr, 0, (void *)(FPTR)MUI_MOUSEOVER_COLOR);
539   item_append(_("Mouse over background color"), nullptr, 0, (void *)(FPTR)MUI_MOUSEOVER_BG_COLOR);
540   item_append(_("Mouse down color"), nullptr, 0, (void *)(FPTR)MUI_MOUSEDOWN_COLOR);
541   item_append(_("Mouse down background color"), nullptr, 0, (void *)(FPTR)MUI_MOUSEDOWN_BG_COLOR);
542542
543543   item_append(MENU_SEPARATOR_ITEM, nullptr, 0, nullptr);
544   item_append("Restore originals colors", nullptr, 0, (void *)(FPTR)MUI_RESTORE);
544   item_append(_("Restore originals colors"), nullptr, 0, (void *)(FPTR)MUI_RESTORE);
545545
546546   custombottom = customtop = machine().ui().get_line_height() + 3.0f * UI_BOX_TB_BORDER;
547547}
r253617r253618
557557   float line_height = mui.get_line_height();
558558
559559   // top text
560   std::string topbuf("UI Colors Settings");
560   std::string topbuf(_("UI Colors Settings"));
561561
562562   mui.draw_text_full(container, topbuf.c_str(), 0.0f, 0.0f, 1.0f, JUSTIFY_CENTER, WRAP_NEVER,
563563                                 DRAW_NONE, ARGB_WHITE, ARGB_BLACK, &width, nullptr);
r253617r253618
585585   // bottom text
586586   // get the text for 'UI Select'
587587   std::string ui_select_text = machine().input().seq_name(machine().ioport().type_seq(IPT_UI_SELECT, 0, SEQ_TYPE_STANDARD));
588   topbuf.assign("Double click or press ").append(ui_select_text.c_str()).append(" to change the color value");
588   topbuf.assign(_("Double click or press ")).append(ui_select_text.c_str()).append(_(" to change the color value"));
589589
590590   mui.draw_text_full(container, topbuf.c_str(), 0.0f, 0.0f, 1.0f, JUSTIFY_CENTER, WRAP_NEVER,
591591                                 DRAW_NONE, ARGB_WHITE, ARGB_BLACK, &width, nullptr);
r253617r253618
611611                                 DRAW_NORMAL, UI_TEXT_COLOR, UI_TEXT_BG_COLOR, nullptr, nullptr);
612612
613613   // compute maxwidth
614   topbuf = "Menu Preview";
614   topbuf = _("Menu Preview");
615615
616616   mui.draw_text_full(container, topbuf.c_str(), 0.0f, 0.0f, 1.0f, JUSTIFY_CENTER, WRAP_NEVER,
617617                                 DRAW_NONE, ARGB_WHITE, ARGB_BLACK, &width, nullptr);
r253617r253618
619619
620620   std::string sampletxt[5];
621621
622   sampletxt[0] = "Normal";
623   sampletxt[1] = "Subitem";
624   sampletxt[2] = "Selected";
625   sampletxt[3] = "Mouse Over";
626   sampletxt[4] = "Clone";
622   sampletxt[0] = _("Normal");
623   sampletxt[1] = _("Subitem");
624   sampletxt[2] = _("Selected");
625   sampletxt[3] = _("Mouse Over");
626   sampletxt[4] = _("Clone");
627627
628628   for (auto & elem: sampletxt)
629629   {
r253617r253618
889889      item_append("Blue", s_text.c_str(), 0, (void *)(FPTR)RGB_BLUE);
890890
891891   item_append(MENU_SEPARATOR_ITEM, nullptr, 0, nullptr);
892   item_append("Choose from palette", nullptr, 0, (void *)(FPTR)PALETTE_CHOOSE);
892   item_append(_("Choose from palette"), nullptr, 0, (void *)(FPTR)PALETTE_CHOOSE);
893893   item_append(MENU_SEPARATOR_ITEM, nullptr, 0, nullptr);
894894
895895   custombottom = customtop = machine().ui().get_line_height() + 3.0f * UI_BOX_TB_BORDER;
r253617r253618
905905   ui_manager &mui = machine().ui();
906906
907907   // top text
908   std::string topbuf = std::string(m_title).append(" - ARGB Settings");
908   std::string topbuf = std::string(m_title).append(_(" - ARGB Settings"));
909909   mui.draw_text_full(container, topbuf.c_str(), 0.0f, 0.0f, 1.0f, JUSTIFY_CENTER, WRAP_NEVER,
910910                                 DRAW_NONE, ARGB_WHITE, ARGB_BLACK, &width, nullptr);
911911   width += 2 * UI_BOX_LR_BORDER;
r253617r253618
929929   mui.draw_text_full(container, topbuf.c_str(), x1, y1, x2 - x1, JUSTIFY_CENTER, WRAP_NEVER,
930930                                 DRAW_NORMAL, UI_TEXT_COLOR, UI_TEXT_BG_COLOR, nullptr, nullptr);
931931
932   std::string sampletxt("Color preview =");
932   std::string sampletxt(_("Color preview ="));
933933   maxwidth = origx2 - origx1;
934934   mui.draw_text_full(container, sampletxt.c_str(), 0.0f, 0.0f, 1.0f, JUSTIFY_CENTER, WRAP_NEVER,
935935                                 DRAW_NONE, ARGB_WHITE, ARGB_BLACK, &width, nullptr);
trunk/src/emu/ui/datmenu.cpp
r253617r253618
5656   issoft = true;
5757
5858   if (machine.datfile().has_software(m_list, m_short, m_parent))
59      m_items_list.emplace_back("Software History", UI_HISTORY_LOAD, machine.datfile().rev_history());
59      m_items_list.emplace_back(_("Software History"), UI_HISTORY_LOAD, machine.datfile().rev_history());
6060   if (swinfo && !swinfo->usage.empty())
61      m_items_list.emplace_back("Software Usage", 0, "");     
61      m_items_list.emplace_back(_("Software Usage"), 0, "");
6262}
6363
6464//-------------------------------------------------
r253617r253618
196196
197197   // bottom
198198   std::string revision;
199   revision.assign("Revision: ").append(m_items_list[actual].revision);
199   revision.assign(_("Revision: ")).append(m_items_list[actual].revision);
200200   mui.draw_text_full(container, revision.c_str(), 0.0f, 0.0f, 1.0f, JUSTIFY_CENTER, WRAP_TRUNCATE,
201201                                 DRAW_NONE, ARGB_WHITE, ARGB_BLACK, &width, nullptr);
202202   width += 2 * UI_BOX_LR_BORDER;
r253617r253618
288288{
289289   datfile_manager &datfile = machine().datfile();
290290   if (datfile.has_history(m_driver))
291      m_items_list.emplace_back("History", UI_HISTORY_LOAD, datfile.rev_history());
291      m_items_list.emplace_back(_("History"), UI_HISTORY_LOAD, datfile.rev_history());
292292   if (datfile.has_mameinfo(m_driver))
293      m_items_list.emplace_back("Mameinfo", UI_MAMEINFO_LOAD, datfile.rev_mameinfo());
293      m_items_list.emplace_back(_("Mameinfo"), UI_MAMEINFO_LOAD, datfile.rev_mameinfo());
294294   if (datfile.has_messinfo(m_driver))
295      m_items_list.emplace_back("Messinfo", UI_MESSINFO_LOAD, datfile.rev_messinfo());
295      m_items_list.emplace_back(_("Messinfo"), UI_MESSINFO_LOAD, datfile.rev_messinfo());
296296   if (datfile.has_sysinfo(m_driver))
297      m_items_list.emplace_back("Sysinfo", UI_SYSINFO_LOAD, datfile.rev_sysinfo());
297      m_items_list.emplace_back(_("Sysinfo"), UI_SYSINFO_LOAD, datfile.rev_sysinfo());
298298   if (datfile.has_story(m_driver))
299      m_items_list.emplace_back("Mamescore", UI_STORY_LOAD, datfile.rev_storyinfo());
299      m_items_list.emplace_back(_("Mamescore"), UI_STORY_LOAD, datfile.rev_storyinfo());
300300   if (datfile.has_command(m_driver))
301      m_items_list.emplace_back("Command", UI_COMMAND_LOAD, "");
301      m_items_list.emplace_back(_("Command"), UI_COMMAND_LOAD, "");
302302}
303303
trunk/src/emu/ui/dirmenu.cpp
r253617r253618
278278   float width, maxwidth = origx2 - origx1;
279279   ui_manager &mui = machine().ui();
280280   std::string tempbuf[2];
281   tempbuf[0] = (m_change) ? "Change" : "Add";
282   tempbuf[0].append(" ").append(s_folders_entry[m_ref].name).append(" Folder - Search: ").append(m_search).append("_");
281   tempbuf[0] = (m_change) ? _("Change)") : _("Add");
282   tempbuf[0].append(" ").append(s_folders_entry[m_ref].name).append(_(" Folder - Search: ")).append(m_search).append("_");
283283   tempbuf[1] = m_current_path;
284284
285285   // get the size of the text
r253617r253618
314314   }
315315
316316   // bottom text
317   tempbuf[0] = "Press TAB to set";
317   tempbuf[0] = _("Press TAB to set");
318318
319319   mui.draw_text_full(container, tempbuf[0].c_str(), 0.0f, 0.0f, 1.0f, JUSTIFY_CENTER, WRAP_TRUNCATE,
320320      DRAW_NONE, ARGB_WHITE, ARGB_BLACK, &width, nullptr);
r253617r253618
422422   ui_manager &mui = machine().ui();
423423
424424   // get the size of the text
425   mui.draw_text_full(container, "Folder Setup", 0.0f, 0.0f, 1.0f, JUSTIFY_CENTER, WRAP_TRUNCATE,
425   mui.draw_text_full(container, _("Folders Setup"), 0.0f, 0.0f, 1.0f, JUSTIFY_CENTER, WRAP_TRUNCATE,
426426      DRAW_NONE, ARGB_WHITE, ARGB_BLACK, &width, nullptr);
427427   width += (2.0f * UI_BOX_LR_BORDER) + 0.01f;
428428   float maxwidth = MAX(width, origx2 - origx1);
r253617r253618
442442   y1 += UI_BOX_TB_BORDER;
443443
444444   // draw the text within it
445   mui.draw_text_full(container, "Folder Setup", x1, y1, x2 - x1, JUSTIFY_CENTER, WRAP_TRUNCATE,
445   mui.draw_text_full(container, _("Folders Setup"), x1, y1, x2 - x1, JUSTIFY_CENTER, WRAP_TRUNCATE,
446446      DRAW_NORMAL, UI_TEXT_COLOR, UI_TEXT_BG_COLOR, nullptr, nullptr);
447447}
448448
r253617r253618
491491
492492void ui_menu_display_actual::populate()
493493{
494   m_tempbuf.assign("Current ").append(s_folders_entry[m_ref - 1].name).append(" Folders");
494   m_tempbuf.assign(_("Current ")).append(s_folders_entry[m_ref - 1].name).append(_(" Folders"));
495495   if (machine().ui().options().exists(s_folders_entry[m_ref - 1].option)) {
496496      m_searchpath.assign(machine().ui().options().value(s_folders_entry[m_ref - 1].option));
497497   }
r253617r253618
505505      m_folders.push_back(curpath);
506506
507507   if (m_change)
508      item_append("Change Folder", nullptr, 0, (void *)CHANGE_FOLDER);
508      item_append(_("Change Folder"), nullptr, 0, (void *)CHANGE_FOLDER);
509509   else
510      item_append("Add Folder", nullptr, 0, (void *)ADD_FOLDER);
510      item_append(_("Add Folder"), nullptr, 0, (void *)ADD_FOLDER);
511511
512512   if (m_folders.size() > 1)
513      item_append("Remove Folder", nullptr, 0, (void *)REMOVE_FOLDER);
513      item_append(_("Remove Folder"), nullptr, 0, (void *)REMOVE_FOLDER);
514514
515515   item_append(MENU_SEPARATOR_ITEM, nullptr, 0, nullptr);
516516   customtop = (m_folders.size() + 1) * machine().ui().get_line_height() + 6.0f * UI_BOX_TB_BORDER;
r253617r253618
664664{
665665   float width;
666666   ui_manager &mui = machine().ui();
667   std::string tempbuf = std::string("Remove ").append(s_folders_entry[m_ref].name).append(" Folder");
667   std::string tempbuf = std::string(_("Remove ")).append(s_folders_entry[m_ref].name).append(_(" Folder"));
668668
669669   // get the size of the text
670670   mui.draw_text_full(container, tempbuf.c_str(), 0.0f, 0.0f, 1.0f, JUSTIFY_CENTER, WRAP_NEVER, DRAW_NONE, ARGB_WHITE, ARGB_BLACK, &width, nullptr);
trunk/src/emu/ui/dsplmenu.cpp
r253617r253618
202202{
203203   float width;
204204   ui_manager &mui = machine().ui();
205   mui.draw_text_full(container, "Display Options", 0.0f, 0.0f, 1.0f, JUSTIFY_CENTER, WRAP_TRUNCATE, DRAW_NONE,
205   mui.draw_text_full(container, _("Display Options"), 0.0f, 0.0f, 1.0f, JUSTIFY_CENTER, WRAP_TRUNCATE, DRAW_NONE,
206206      ARGB_WHITE, ARGB_BLACK, &width, nullptr);
207207   width += 2 * UI_BOX_LR_BORDER;
208208   float maxwidth = MAX(origx2 - origx1, width);
r253617r253618
222222   y1 += UI_BOX_TB_BORDER;
223223
224224   // draw the text within it
225   mui.draw_text_full(container, "Display Options", x1, y1, x2 - x1, JUSTIFY_CENTER, WRAP_TRUNCATE, DRAW_NORMAL,
225   mui.draw_text_full(container, _("Display Options"), x1, y1, x2 - x1, JUSTIFY_CENTER, WRAP_TRUNCATE, DRAW_NORMAL,
226226      UI_TEXT_COLOR, UI_TEXT_BG_COLOR, nullptr, nullptr);
227227}
trunk/src/emu/ui/miscmenu.cpp
r253617r253618
3232void ui_menu_keyboard_mode::populate()
3333{
3434   bool natural = machine().ui().use_natural_keyboard();
35   item_append("Keyboard Mode:", natural ? "Natural" : "Emulated", natural ? MENU_FLAG_LEFT_ARROW : MENU_FLAG_RIGHT_ARROW, nullptr);
35   item_append(_("Keyboard Mode:"), natural ? _("Natural") : _("Emulated"), natural ? MENU_FLAG_LEFT_ARROW : MENU_FLAG_RIGHT_ARROW, nullptr);
3636}
3737
3838ui_menu_keyboard_mode::~ui_menu_keyboard_mode()
r253617r253618
8686   }
8787
8888   item_append(MENU_SEPARATOR_ITEM, nullptr, 0, nullptr);
89   item_append("Reset",  nullptr, 0, (void *)1);
89   item_append(_("Reset"),  nullptr, 0, (void *)1);
9090}
9191
9292ui_menu_bios_selection::~ui_menu_bios_selection()
r253617r253618
260260
261261      /* display whether or not we are locked out */
262262      if (machine().bookkeeping().coin_lockout_get_state(ctrnum))
263         tempstring.append(" (locked)");
263         tempstring.append(_(" (locked)"));
264264      tempstring.append("\n");
265265   }
266266
r253617r253618
520520
521521      /* add CROSSHAIR_ITEM_AUTO_TIME menu */
522522      sprintf(temp_text, "%d", settings.auto_time);
523      item_append("Visible Delay", temp_text, flags, data);
523      item_append(_("Visible Delay"), temp_text, flags, data);
524524   }
525525//  else
526526//      /* leave a blank filler line when not in auto time so size does not rescale */
r253617r253618
559559
560560ui_menu_misc_options::misc_option ui_menu_misc_options::m_options[] = {
561561   { 0, nullptr, nullptr },
562   { 0, "Re-select last machine played",                   OPTION_REMEMBER_LAST },
563   { 0, "Enlarge images in the right panel",               OPTION_ENLARGE_SNAPS },
564   { 0, "DATs info",                                       OPTION_DATS_ENABLED },
565   { 0, "Cheats",                                          OPTION_CHEAT },
566   { 0, "Show mouse pointer",                              OPTION_UI_MOUSE },
567   { 0, "Confirm quit from machines",                      OPTION_UI_CONFIRM_QUIT },
568   { 0, "Skip displaying information's screen at startup", OPTION_UI_SKIP_GAMEINFO },
569   { 0, "Force 4:3 appearance for software snapshot",      OPTION_FORCED4X3 },
570   { 0, "Use image as background",                         OPTION_USE_BACKGROUND },
571   { 0, "Skip bios selection menu",                        OPTION_SKIP_BIOS_MENU },
572   { 0, "Skip software parts selection menu",              OPTION_SKIP_PARTS_MENU }
562   { 0, __("Re-select last machine played"),                   OPTION_REMEMBER_LAST },
563   { 0, __("Enlarge images in the right panel"),               OPTION_ENLARGE_SNAPS },
564   { 0, __("DATs info"),                                       OPTION_DATS_ENABLED },
565   { 0, __("Cheats"),                                          OPTION_CHEAT },
566   { 0, __("Show mouse pointer"),                              OPTION_UI_MOUSE },
567   { 0, __("Confirm quit from machines"),                      OPTION_UI_CONFIRM_QUIT },
568   { 0, __("Skip displaying information's screen at startup"), OPTION_UI_SKIP_GAMEINFO },
569   { 0, __("Force 4:3 appearance for software snapshot"),      OPTION_FORCED4X3 },
570   { 0, __("Use image as background"),                         OPTION_USE_BACKGROUND },
571   { 0, __("Skip bios selection menu"),                        OPTION_SKIP_BIOS_MENU },
572   { 0, __("Skip software parts selection menu"),              OPTION_SKIP_PARTS_MENU }
573573};
574574
575575//-------------------------------------------------
r253617r253618
635635{
636636   // add options items
637637   for (int opt = 1; opt < ARRAY_LENGTH(m_options); ++opt)
638      item_append(m_options[opt].description, m_options[opt].status ? "On" : "Off", m_options[opt].status ? MENU_FLAG_RIGHT_ARROW : MENU_FLAG_LEFT_ARROW, (void *)(FPTR)opt);
638      item_append(_(m_options[opt].description), m_options[opt].status ? "On" : "Off", m_options[opt].status ? MENU_FLAG_RIGHT_ARROW : MENU_FLAG_LEFT_ARROW, (void *)(FPTR)opt);
639639
640640   item_append(MENU_SEPARATOR_ITEM, nullptr, 0, nullptr);
641641   customtop = machine().ui().get_line_height() + (3.0f * UI_BOX_TB_BORDER);
r253617r253618
650650   float width;
651651   ui_manager &mui = machine().ui();
652652
653   mui.draw_text_full(container, "Miscellaneous Options", 0.0f, 0.0f, 1.0f, JUSTIFY_CENTER, WRAP_TRUNCATE,
653   mui.draw_text_full(container, _("Miscellaneous Options"), 0.0f, 0.0f, 1.0f, JUSTIFY_CENTER, WRAP_TRUNCATE,
654654                                 DRAW_NONE, ARGB_WHITE, ARGB_BLACK, &width, nullptr);
655655   width += 2 * UI_BOX_LR_BORDER;
656656   float maxwidth = MAX(origx2 - origx1, width);
r253617r253618
670670   y1 += UI_BOX_TB_BORDER;
671671
672672   // draw the text within it
673   mui.draw_text_full(container, "Miscellaneous Options", x1, y1, x2 - x1, JUSTIFY_CENTER, WRAP_TRUNCATE,
673   mui.draw_text_full(container, _("Miscellaneous Options"), x1, y1, x2 - x1, JUSTIFY_CENTER, WRAP_TRUNCATE,
674674                                 DRAW_NORMAL, UI_TEXT_COLOR, UI_TEXT_BG_COLOR, nullptr, nullptr);
675675}
trunk/src/emu/ui/optsmenu.cpp
r253617r253618
198198
199199      // add filter item
200200      UINT32 arrow_flags = get_arrow_flags((int)FILTER_FIRST, (int)FILTER_LAST, main_filters::actual);
201      item_append("Filter", main_filters::text[main_filters::actual], arrow_flags, (void *)(FPTR)FILTER_MENU);
201      item_append(_("Filter"), main_filters::text[main_filters::actual], arrow_flags, (void *)(FPTR)FILTER_MENU);
202202
203203      // add category subitem
204204      if (main_filters::actual == FILTER_CATEGORY && !machine().inifile().ini_index.empty())
r253617r253618
243243      item_append(MENU_SEPARATOR_ITEM, nullptr, 0, nullptr);
244244
245245      // add options items
246      item_append("Customize UI", nullptr, 0, (void *)(FPTR)CUSTOM_MENU);
246      item_append(_("Customize UI"), nullptr, 0, (void *)(FPTR)CUSTOM_MENU);
247247   }
248   item_append("Display Options", nullptr, 0, (void *)(FPTR)DISPLAY_MENU);
249   item_append("Sound Options", nullptr, 0, (void *)(FPTR)SOUND_MENU);
250   item_append("Miscellaneous Options", nullptr, 0, (void *)(FPTR)MISC_MENU);
251   item_append("Device Mapping", nullptr, 0, (void *)(FPTR)CONTROLLER_MENU);
252   item_append("General Inputs", nullptr, 0, (void *)(FPTR)CGI_MENU);
248   item_append(_("Display Options"), nullptr, 0, (void *)(FPTR)DISPLAY_MENU);
249   item_append(_("Sound Options"), nullptr, 0, (void *)(FPTR)SOUND_MENU);
250   item_append(_("Miscellaneous Options"), nullptr, 0, (void *)(FPTR)MISC_MENU);
251   item_append(_("Device Mapping"), nullptr, 0, (void *)(FPTR)CONTROLLER_MENU);
252   item_append(_("General Inputs"), nullptr, 0, (void *)(FPTR)CGI_MENU);
253253   item_append(MENU_SEPARATOR_ITEM, nullptr, 0, nullptr);
254254
255255   custombottom = 2.0f * machine().ui().get_line_height() + 3.0f * UI_BOX_TB_BORDER;
r253617r253618
264264{
265265   float width;
266266   ui_manager &mui = machine().ui();
267   mui.draw_text_full(container, "Settings", 0.0f, 0.0f, 1.0f, JUSTIFY_CENTER, WRAP_TRUNCATE,
267   mui.draw_text_full(container, _("Settings"), 0.0f, 0.0f, 1.0f, JUSTIFY_CENTER, WRAP_TRUNCATE,
268268                                 DRAW_NONE, ARGB_WHITE, ARGB_BLACK, &width, nullptr);
269269   width += 2 * UI_BOX_LR_BORDER;
270270   float maxwidth = MAX(origx2 - origx1, width);
r253617r253618
284284   y1 += UI_BOX_TB_BORDER;
285285
286286   // draw the text within it
287   mui.draw_text_full(container, "Settings", x1, y1, x2 - x1, JUSTIFY_CENTER, WRAP_TRUNCATE,
287   mui.draw_text_full(container, _("Settings"), x1, y1, x2 - x1, JUSTIFY_CENTER, WRAP_TRUNCATE,
288288                                 DRAW_NORMAL, UI_TEXT_COLOR, UI_TEXT_BG_COLOR, nullptr, nullptr);
289289}
290290
r253617r253618
304304      file.close();
305305   }
306306   else
307      machine.popmessage("**Error to save ui.ini**", emulator_info::get_configname());
307      machine.popmessage(_("**Error to save ui.ini**"));
308308}
trunk/src/emu/ui/selector.cpp
r253617r253618
149149{
150150   float width;
151151   ui_manager &mui = machine().ui();
152   std::string tempbuf = std::string("Selection List - Search: ").append(m_search).append("_");
152   std::string tempbuf = std::string(_("Selection List - Search: ")).append(m_search).append("_");
153153
154154   // get the size of the text
155155   mui.draw_text_full(container, tempbuf.c_str(), 0.0f, 0.0f, 1.0f, JUSTIFY_CENTER, WRAP_TRUNCATE,
r253617r253618
178178   // bottom text
179179   // get the text for 'UI Select'
180180   std::string ui_select_text = machine().input().seq_name(machine().ioport().type_seq(IPT_UI_SELECT, 0, SEQ_TYPE_STANDARD));
181   tempbuf.assign("Double click or press ").append(ui_select_text).append(" to select");
181   tempbuf.assign(_("Double click or press ")).append(ui_select_text).append(_(" to select"));
182182
183183   mui.draw_text_full(container, tempbuf.c_str(), 0.0f, 0.0f, 1.0f, JUSTIFY_CENTER, WRAP_NEVER,
184184      DRAW_NONE, ARGB_WHITE, ARGB_BLACK, &width, nullptr);
trunk/src/emu/ui/selgame.cpp
r253617r253618
620620   // add special items
621621   if (ui_menu::stack_has_special_main_menu())
622622   {
623      item_append("Configure Options", nullptr, MENU_FLAG_UI, (void *)(FPTR)1);
624      item_append("Configure Directories", nullptr, MENU_FLAG_UI, (void *)(FPTR)2);
625      item_append("Save Configuration", nullptr, MENU_FLAG_UI, (void *)(FPTR)3);
623      item_append(_("Configure Options"), nullptr, MENU_FLAG_UI, (void *)(FPTR)1);
624      item_append(_("Configure Directories"), nullptr, MENU_FLAG_UI, (void *)(FPTR)2);
625      item_append(_("Save Configuration"), nullptr, MENU_FLAG_UI, (void *)(FPTR)3);
626626      skip_main_items = 3;
627627   }
628628   else
r253617r253618
743743   if (isfavorite())
744744      tempbuf[1].clear();
745745   else
746      tempbuf[1].assign(filtered).append(" Search: ").append(m_search).append("_");
746      tempbuf[1].assign(filtered).append(_(" Search: ")).append(m_search).append("_");
747747
748748   // get the size of the text
749749   for (int line = 0; line < 2; ++line)
r253617r253618
17581758            hover = phover + filter;
17591759         }
17601760
1761         if (afilter == filter)
1761/*         if (afilter == filter)
17621762         {
17631763            bgcolor = UI_SELECTED_BG_COLOR;
17641764            fgcolor = UI_SELECTED_COLOR;
17651765         }
1766
1766*/
17671767         if (bgcolor != UI_TEXT_BG_COLOR)
17681768            container->add_rect(x1, y1, x2, y1 + line_height_max, bgcolor, PRIMFLAG_BLENDMODE(BLENDMODE_ALPHA) | PRIMFLAG_TEXWRAP(TRUE));
17691769
r253617r253618
17901790            }
17911791            convert_command_glyph(str);
17921792         }
1793         else if (filter == main_filters::actual)
1794         {
1795            str.assign("@custom1 ").append(text[filter]);
1796            x1t -= text_sign;
1797            convert_command_glyph(str);
1798         }
17931799
17941800         mui.draw_text_full(container, str.c_str(), x1t, y1, x2 - x1, JUSTIFY_LEFT, WRAP_NEVER,
17951801            DRAW_NORMAL, fgcolor, bgcolor, nullptr, nullptr, text_size);
r253617r253618
19421948
19431949      if (buffer.empty())
19441950      {
1945         mui.draw_text_full(container, "No Infos Available", origx1, (origy2 + origy1) * 0.5f, origx2 - origx1, JUSTIFY_CENTER,
1951         mui.draw_text_full(container, _("No Infos Available"), origx1, (origy2 + origy1) * 0.5f, origx2 - origx1, JUSTIFY_CENTER,
19461952            WRAP_WORD, DRAW_NORMAL, UI_TEXT_COLOR, UI_TEXT_BG_COLOR, nullptr, nullptr);
19471953         return;
19481954      }
r253617r253618
20452051      // apply title to right panel
20462052      if (soft->usage.empty())
20472053      {
2048         mui.draw_text_full(container, "History", origx1, origy1, origx2 - origx1, JUSTIFY_CENTER, WRAP_TRUNCATE,
2054         mui.draw_text_full(container, _("History"), origx1, origy1, origx2 - origx1, JUSTIFY_CENTER, WRAP_TRUNCATE,
20492055            DRAW_NORMAL, UI_TEXT_COLOR, UI_TEXT_BG_COLOR, nullptr, nullptr);
20502056         ui_globals::cur_sw_dats_view = 0;
20512057      }
r253617r253618
20542060         float title_size = 0.0f;
20552061         float txt_lenght = 0.0f;
20562062         std::string t_text[2];
2057         t_text[0] = "History";
2058         t_text[1] = "Usage";
2063         t_text[0] = _("History");
2064         t_text[1] = _("Usage");
20592065
20602066         for (auto & elem: t_text)
20612067         {
r253617r253618
20892095
20902096      if (buffer.empty())
20912097      {
2092         mui.draw_text_full(container, "No Infos Available", origx1, (origy2 + origy1) * 0.5f, origx2 - origx1, JUSTIFY_CENTER,
2098         mui.draw_text_full(container, _("No Infos Available"), origx1, (origy2 + origy1) * 0.5f, origx2 - origx1, JUSTIFY_CENTER,
20932099            WRAP_WORD, DRAW_NORMAL, UI_TEXT_COLOR, UI_TEXT_BG_COLOR, nullptr, nullptr);
20942100         return;
20952101      }
trunk/src/emu/ui/selsoft.cpp
r253617r253618
106106
107107         if (bname == default_name)
108108         {
109            name.append(" (default)");
109            name.append(_(" (default)"));
110110            biosname.emplace(biosname.begin(), name, bios_flags - 1);
111111         }
112112         else
r253617r253618
618618   tempbuf[1].assign("Driver: \"").append(m_driver->description).append("\" software list ");
619619
620620   if (sw_filters::actual == UI_SW_REGION && m_filter.region.ui.size() != 0)
621      filtered.assign("Region: ").append(m_filter.region.ui[m_filter.region.actual]).append(" - ");
621      filtered.assign(_("Region: ")).append(m_filter.region.ui[m_filter.region.actual]).append(" - ");
622622   else if (sw_filters::actual == UI_SW_PUBLISHERS)
623      filtered.assign("Publisher: ").append(m_filter.publisher.ui[m_filter.publisher.actual]).append(" - ");
623      filtered.assign(_("Publisher: ")).append(m_filter.publisher.ui[m_filter.publisher.actual]).append(" - ");
624624   else if (sw_filters::actual == UI_SW_YEARS)
625      filtered.assign("Year: ").append(m_filter.year.ui[m_filter.year.actual]).append(" - ");
625      filtered.assign(_("Year: ")).append(m_filter.year.ui[m_filter.year.actual]).append(" - ");
626626   else if (sw_filters::actual == UI_SW_LIST)
627      filtered.assign("Software List: ").append(m_filter.swlist.description[m_filter.swlist.actual]).append(" - ");
627      filtered.assign(_("Software List: ")).append(m_filter.swlist.description[m_filter.swlist.actual]).append(" - ");
628628   else if (sw_filters::actual == UI_SW_TYPE)
629      filtered.assign("Device type: ").append(m_filter.type.ui[m_filter.type.actual]).append(" - ");
629      filtered.assign(_("Device type: ")).append(m_filter.type.ui[m_filter.type.actual]).append(" - ");
630630
631   tempbuf[2].assign(filtered).append("Search: ").append(m_search).append("_");
631   tempbuf[2].assign(filtered).append(_("Search: ")).append(m_search).append("_");
632632
633633   // get the size of the text
634634   float maxwidth = origx2 - origx1;
r253617r253618
13191319            hover = phover + filter;
13201320         }
13211321
1322         if (afilter == filter)
1322/*         if (afilter == filter)
13231323         {
13241324            bgcolor = UI_SELECTED_BG_COLOR;
13251325            fgcolor = UI_SELECTED_COLOR;
13261326         }
1327
1327*/
13281328         if (bgcolor != UI_TEXT_BG_COLOR)
13291329            container->add_rect(x1, y1, x2, y1 + line_height, bgcolor, PRIMFLAG_BLENDMODE(BLENDMODE_ALPHA) | PRIMFLAG_TEXWRAP(TRUE));
13301330
r253617r253618
13511351            }
13521352            convert_command_glyph(str);
13531353         }
1354         else if (filter == sw_filters::actual)
1355         {
1356            str.assign("@custom1 ").append(text[filter]);
1357            x1t -= text_sign;
1358            convert_command_glyph(str);
1359         }
13541360
13551361         mui.draw_text_full(container, str.c_str(), x1t, y1, x2 - x1, JUSTIFY_LEFT, WRAP_NEVER,
13561362                            DRAW_NORMAL, fgcolor, bgcolor, nullptr, nullptr, text_size);
r253617r253618
14321438   // apply title to right panel
14331439   if (soft && soft->usage.empty())
14341440   {
1435      mui.draw_text_full(container, "History", origx1, origy1, origx2 - origx1, JUSTIFY_CENTER, WRAP_TRUNCATE,
1441      mui.draw_text_full(container, _("History"), origx1, origy1, origx2 - origx1, JUSTIFY_CENTER, WRAP_TRUNCATE,
14361442                                    DRAW_NORMAL, UI_TEXT_COLOR, UI_TEXT_BG_COLOR, nullptr, nullptr);
14371443      ui_globals::cur_sw_dats_view = 0;
14381444   }
r253617r253618
14411447      float title_size = 0.0f;
14421448      float txt_lenght = 0.0f;
14431449      std::string t_text[2];
1444      t_text[0] = "History";
1445      t_text[1] = "Usage";
1450      t_text[0] = _("History");
1451      t_text[1] = _("Usage");
14461452
14471453      for (auto & elem : t_text)
14481454      {
r253617r253618
14771483
14781484   if (buffer.empty())
14791485   {
1480      mui.draw_text_full(container, "No Infos Available", origx1, (origy2 + origy1) * 0.5f, origx2 - origx1, JUSTIFY_CENTER,
1486      mui.draw_text_full(container, _("No Infos Available"), origx1, (origy2 + origy1) * 0.5f, origx2 - origx1, JUSTIFY_CENTER,
14811487                                    WRAP_WORD, DRAW_NORMAL, UI_TEXT_COLOR, UI_TEXT_BG_COLOR, nullptr, nullptr);
14821488      return;
14831489   }
r253617r253618
18131819{
18141820   float width;
18151821   ui_manager &mui = machine().ui();
1816   mui.draw_text_full(container, "Software part selection:", 0.0f, 0.0f, 1.0f, JUSTIFY_CENTER, WRAP_TRUNCATE,
1822   mui.draw_text_full(container, _("Software part selection:"), 0.0f, 0.0f, 1.0f, JUSTIFY_CENTER, WRAP_TRUNCATE,
18171823                                 DRAW_NONE, ARGB_WHITE, ARGB_BLACK, &width, nullptr);
18181824   width += 2 * UI_BOX_LR_BORDER;
18191825   float maxwidth = MAX(origx2 - origx1, width);
r253617r253618
18331839   y1 += UI_BOX_TB_BORDER;
18341840
18351841   // draw the text within it
1836   mui.draw_text_full(container, "Software part selection:", x1, y1, x2 - x1, JUSTIFY_CENTER, WRAP_TRUNCATE,
1842   mui.draw_text_full(container, _("Software part selection:"), x1, y1, x2 - x1, JUSTIFY_CENTER, WRAP_TRUNCATE,
18371843                                 DRAW_NORMAL, UI_TEXT_COLOR, UI_TEXT_BG_COLOR, nullptr, nullptr);
18381844}
18391845
r253617r253618
19511957{
19521958   float width;
19531959   ui_manager &mui = machine().ui();
1954   mui.draw_text_full(container, "Bios selection:", 0.0f, 0.0f, 1.0f, JUSTIFY_CENTER, WRAP_TRUNCATE,
1960   mui.draw_text_full(container, _("Bios selection:"), 0.0f, 0.0f, 1.0f, JUSTIFY_CENTER, WRAP_TRUNCATE,
19551961                                 DRAW_NONE, ARGB_WHITE, ARGB_BLACK, &width, nullptr);
19561962   width += 2 * UI_BOX_LR_BORDER;
19571963   float maxwidth = MAX(origx2 - origx1, width);
r253617r253618
19711977   y1 += UI_BOX_TB_BORDER;
19721978
19731979   // draw the text within it
1974   mui.draw_text_full(container, "Bios selection:", x1, y1, x2 - x1, JUSTIFY_CENTER, WRAP_TRUNCATE,
1980   mui.draw_text_full(container, _("Bios selection:"), x1, y1, x2 - x1, JUSTIFY_CENTER, WRAP_TRUNCATE,
19751981                                 DRAW_NORMAL, UI_TEXT_COLOR, UI_TEXT_BG_COLOR, nullptr, nullptr);
19761982}
trunk/src/emu/ui/simpleselgame.cpp
r253617r253618
261261   if (ui_menu::stack_has_special_main_menu())
262262   {
263263      item_append(MENU_SEPARATOR_ITEM, nullptr, 0, nullptr);
264      item_append("Configure Options", nullptr, 0, (void *)1);
265      item_append("Save Configuration", nullptr, 0, (void *)2);
264      item_append(_("Configure Options"), nullptr, 0, (void *)1);
265      item_append(_("Save Configuration"), nullptr, 0, (void *)2);
266266      skip_main_items = 2;
267267   }
268268
trunk/src/emu/ui/slotopt.cpp
r253617r253618
163163      {
164164         opt_name.assign(option->name());
165165         if (slot->fixed() || slot_get_length(slot) == 0)
166            opt_name.append(" [internal]");
166            opt_name.append(_(" [internal]"));
167167      }
168168
169169      item_append(slot->device().tag() + 1, opt_name.c_str(), (slot->fixed() || slot_get_length(slot) == 0) ? 0 : (MENU_FLAG_LEFT_ARROW | MENU_FLAG_RIGHT_ARROW), (void *)slot);
170170   }
171171   item_append(MENU_SEPARATOR_ITEM, nullptr, 0, nullptr);
172   item_append("Reset",  nullptr, 0, (void *)1);
172   item_append(_("Reset"),  nullptr, 0, (void *)1);
173173}
174174
175175ui_menu_slot_devices::~ui_menu_slot_devices()
trunk/src/emu/ui/sndmenu.cpp
r253617r253618
133133   strprintf(s_text, "%d", m_sample_rate);
134134
135135   // add options items
136   item_append("Sound", m_sound ? "On" : "Off", m_sound ? MENU_FLAG_RIGHT_ARROW : MENU_FLAG_LEFT_ARROW, (void *)(FPTR)ENABLE_SOUND);
137   item_append("Sample Rate", s_text.c_str(), arrow_flags, (void *)(FPTR)SAMPLE_RATE);
138   item_append("Use External Samples", m_samples ? "On" : "Off", m_samples ? MENU_FLAG_RIGHT_ARROW : MENU_FLAG_LEFT_ARROW, (void *)(FPTR)ENABLE_SAMPLES);
136   item_append(_("Sound"), m_sound ? "On" : "Off", m_sound ? MENU_FLAG_RIGHT_ARROW : MENU_FLAG_LEFT_ARROW, (void *)(FPTR)ENABLE_SOUND);
137   item_append(_("Sample Rate"), s_text.c_str(), arrow_flags, (void *)(FPTR)SAMPLE_RATE);
138   item_append(_("Use External Samples"), m_samples ? "On" : "Off", m_samples ? MENU_FLAG_RIGHT_ARROW : MENU_FLAG_LEFT_ARROW, (void *)(FPTR)ENABLE_SAMPLES);
139139   item_append(MENU_SEPARATOR_ITEM, nullptr, 0, nullptr);
140140
141141   customtop = machine().ui().get_line_height() + (3.0f * UI_BOX_TB_BORDER);
r253617r253618
149149{
150150   float width;
151151   ui_manager &mui = machine().ui();
152   mui.draw_text_full(container, "Sound Options", 0.0f, 0.0f, 1.0f, JUSTIFY_CENTER, WRAP_TRUNCATE,
152   mui.draw_text_full(container, _("Sound Options"), 0.0f, 0.0f, 1.0f, JUSTIFY_CENTER, WRAP_TRUNCATE,
153153                                 DRAW_NONE, ARGB_WHITE, ARGB_BLACK, &width, nullptr);
154154   width += 2 * UI_BOX_LR_BORDER;
155155   float maxwidth = MAX(origx2 - origx1, width);
r253617r253618
169169   y1 += UI_BOX_TB_BORDER;
170170
171171   // draw the text within it
172   mui.draw_text_full(container, "Sound Options", x1, y1, x2 - x1, JUSTIFY_CENTER, WRAP_TRUNCATE,
172   mui.draw_text_full(container, _("Sound Options"), x1, y1, x2 - x1, JUSTIFY_CENTER, WRAP_TRUNCATE,
173173                                 DRAW_NORMAL, UI_TEXT_COLOR, UI_TEXT_BG_COLOR, nullptr, nullptr);
174174}


Previous 199869 Revisions Next


© 1997-2024 The MAME Team