mirror of
https://github.com/libretro/scummvm.git
synced 2024-12-13 12:39:56 +00:00
GUI: U32: Shift most widgets to draw with u32
- ButtonWidgets (Button, Radio, Checkbox, dropdown) - StaticTextWidgets - PopUpWidgets - Tabs - Add a temporary overloaded drawDDText function to make other widgets draw normally
This commit is contained in:
parent
2745d51fe7
commit
aafade4507
@ -219,7 +219,7 @@ void RemapWidget::startRemapping(uint actionIndex) {
|
||||
_remapTimeout = g_system->getMillis() + kRemapTimeoutDelay;
|
||||
_remapInputWatcher->startWatching();
|
||||
|
||||
_actions[actionIndex].keyButton->setLabel("...");
|
||||
_actions[actionIndex].keyButton->setLabel(Common::convertToU32String("..."));
|
||||
_actions[actionIndex].keyButton->setTooltip("");
|
||||
_actions[actionIndex].keyButton->markAsDirty();
|
||||
|
||||
@ -278,12 +278,12 @@ void RemapWidget::refreshKeymap() {
|
||||
ActionRow &row = _actions[i];
|
||||
|
||||
if (!row.actionText) {
|
||||
row.actionText = new GUI::StaticTextWidget(widgetsBoss(), 0, 0, 0, 0, "", Graphics::kTextAlignStart, nullptr, GUI::ThemeEngine::kFontStyleNormal);
|
||||
row.actionText = new GUI::StaticTextWidget(widgetsBoss(), 0, 0, 0, 0, Common::convertToU32String(""), Graphics::kTextAlignStart, nullptr, GUI::ThemeEngine::kFontStyleNormal);
|
||||
row.actionText->setLabel(row.action->description);
|
||||
|
||||
row.keyButton = new GUI::DropdownButtonWidget(widgetsBoss(), 0, 0, 0, 0, "", nullptr, kRemapCmd + i);
|
||||
row.keyButton->appendEntry(_("Reset to defaults"), kResetActionCmd + i);
|
||||
row.keyButton->appendEntry(_("Clear mapping"), kClearCmd + i);
|
||||
row.keyButton = new GUI::DropdownButtonWidget(widgetsBoss(), 0, 0, 0, 0, Common::convertToU32String(""), nullptr, kRemapCmd + i);
|
||||
row.keyButton->appendEntry(Common::convertToU32String(_("Reset to defaults")), kResetActionCmd + i);
|
||||
row.keyButton->appendEntry(Common::convertToU32String(_("Clear mapping")), kClearCmd + i);
|
||||
}
|
||||
|
||||
Array<HardwareInput> mappedInputs = row.keymap->getActionMapping(row.action);
|
||||
@ -301,17 +301,17 @@ void RemapWidget::refreshKeymap() {
|
||||
row.keyButton->setLabel(keysLabel);
|
||||
row.keyButton->setTooltip(keysLabel);
|
||||
} else {
|
||||
row.keyButton->setLabel("-");
|
||||
row.keyButton->setLabel(Common::convertToU32String("-"));
|
||||
row.keyButton->setTooltip("");
|
||||
}
|
||||
|
||||
KeymapTitleRow &keymapTitle = _keymapSeparators[row.keymap];
|
||||
if (!keymapTitle.descriptionText) {
|
||||
keymapTitle.descriptionText = new GUI::StaticTextWidget(widgetsBoss(), 0, 0, 0, 0, row.keymap->getDescription(), Graphics::kTextAlignStart);
|
||||
keymapTitle.resetButton = new GUI::ButtonWidget(widgetsBoss(), 0, 0, 0, 0, "", nullptr, kResetKeymapCmd + i);
|
||||
keymapTitle.resetButton = new GUI::ButtonWidget(widgetsBoss(), 0, 0, 0, 0, Common::convertToU32String(""), nullptr, kResetKeymapCmd + i);
|
||||
|
||||
// I18N: Button to reset keymap mappings to defaults
|
||||
keymapTitle.resetButton->setLabel(_("Reset"));
|
||||
keymapTitle.resetButton->setLabel(Common::convertToU32String(_("Reset")));
|
||||
keymapTitle.resetButton->setTooltip(_("Reset to defaults"));
|
||||
}
|
||||
}
|
||||
|
@ -59,7 +59,7 @@ MainMenuDialog::MainMenuDialog(Engine *engine)
|
||||
_logo->useThemeTransparency(true);
|
||||
_logo->setGfx(g_gui.theme()->getImageSurface(GUI::ThemeEngine::kImageLogoSmall));
|
||||
} else {
|
||||
GUI::StaticTextWidget *title = new GUI::StaticTextWidget(this, "GlobalMenu.Title", "ScummVM");
|
||||
GUI::StaticTextWidget *title = new GUI::StaticTextWidget(this, "GlobalMenu.Title", Common::convertToU32String("ScummVM"));
|
||||
title->setAlign(Graphics::kTextAlignCenter);
|
||||
}
|
||||
#else
|
||||
@ -67,36 +67,36 @@ MainMenuDialog::MainMenuDialog(Engine *engine)
|
||||
title->setAlign(Graphics::kTextAlignCenter);
|
||||
#endif
|
||||
|
||||
GUI::StaticTextWidget *version = new GUI::StaticTextWidget(this, "GlobalMenu.Version", gScummVMVersionDate);
|
||||
GUI::StaticTextWidget *version = new GUI::StaticTextWidget(this, "GlobalMenu.Version", Common::convertToU32String(gScummVMVersionDate));
|
||||
version->setAlign(Graphics::kTextAlignCenter);
|
||||
|
||||
new GUI::ButtonWidget(this, "GlobalMenu.Resume", _("~R~esume"), 0, kPlayCmd, 'P');
|
||||
new GUI::ButtonWidget(this, "GlobalMenu.Resume", Common::convertToU32String(_("~R~esume")), 0, kPlayCmd, 'P');
|
||||
|
||||
_loadButton = new GUI::ButtonWidget(this, "GlobalMenu.Load", _("~L~oad"), 0, kLoadCmd);
|
||||
_loadButton = new GUI::ButtonWidget(this, "GlobalMenu.Load", Common::convertToU32String(_("~L~oad")), 0, kLoadCmd);
|
||||
_loadButton->setVisible(_engine->hasFeature(Engine::kSupportsLoadingDuringRuntime));
|
||||
_loadButton->setEnabled(_engine->hasFeature(Engine::kSupportsLoadingDuringRuntime));
|
||||
|
||||
_saveButton = new GUI::ButtonWidget(this, "GlobalMenu.Save", _("~S~ave"), 0, kSaveCmd);
|
||||
_saveButton = new GUI::ButtonWidget(this, "GlobalMenu.Save", Common::convertToU32String(_("~S~ave")), 0, kSaveCmd);
|
||||
_saveButton->setVisible(_engine->hasFeature(Engine::kSupportsSavingDuringRuntime));
|
||||
_saveButton->setEnabled(_engine->hasFeature(Engine::kSupportsSavingDuringRuntime));
|
||||
|
||||
new GUI::ButtonWidget(this, "GlobalMenu.Options", _("~O~ptions"), 0, kOptionsCmd);
|
||||
new GUI::ButtonWidget(this, "GlobalMenu.Options", Common::convertToU32String(_("~O~ptions")), 0, kOptionsCmd);
|
||||
|
||||
// The help button is disabled by default.
|
||||
// To enable "Help", an engine needs to use a subclass of MainMenuDialog
|
||||
// (at least for now, we might change how this works in the future).
|
||||
_helpButton = new GUI::ButtonWidget(this, "GlobalMenu.Help", _("~H~elp"), 0, kHelpCmd);
|
||||
_helpButton = new GUI::ButtonWidget(this, "GlobalMenu.Help", Common::convertToU32String(_("~H~elp")), 0, kHelpCmd);
|
||||
|
||||
new GUI::ButtonWidget(this, "GlobalMenu.About", _("~A~bout"), 0, kAboutCmd);
|
||||
new GUI::ButtonWidget(this, "GlobalMenu.About", Common::convertToU32String(_("~A~bout")), 0, kAboutCmd);
|
||||
|
||||
if (g_system->getOverlayWidth() > 320)
|
||||
_returnToLauncherButton = new GUI::ButtonWidget(this, "GlobalMenu.ReturnToLauncher", _("~R~eturn to Launcher"), 0, kLauncherCmd);
|
||||
_returnToLauncherButton = new GUI::ButtonWidget(this, "GlobalMenu.ReturnToLauncher", Common::convertToU32String(_("~R~eturn to Launcher")), 0, kLauncherCmd);
|
||||
else
|
||||
_returnToLauncherButton = new GUI::ButtonWidget(this, "GlobalMenu.ReturnToLauncher", _c("~R~eturn to Launcher", "lowres"), 0, kLauncherCmd);
|
||||
_returnToLauncherButton = new GUI::ButtonWidget(this, "GlobalMenu.ReturnToLauncher", Common::convertToU32String(_c("~R~eturn to Launcher", "lowres")), 0, kLauncherCmd);
|
||||
_returnToLauncherButton->setEnabled(_engine->hasFeature(Engine::kSupportsReturnToLauncher));
|
||||
|
||||
if (!g_system->hasFeature(OSystem::kFeatureNoQuit))
|
||||
new GUI::ButtonWidget(this, "GlobalMenu.Quit", _("~Q~uit"), 0, kQuitCmd);
|
||||
new GUI::ButtonWidget(this, "GlobalMenu.Quit", Common::convertToU32String(_("~Q~uit")), 0, kQuitCmd);
|
||||
|
||||
_aboutDialog = new GUI::AboutDialog();
|
||||
_loadDialog = new GUI::SaveLoadChooser(_("Load game:"), _("Load"), false);
|
||||
@ -166,9 +166,9 @@ void MainMenuDialog::reflowLayout() {
|
||||
// FIXME: it might be better to declare GUI::StaticTextWidget::setLabel() virtual
|
||||
// and to reimplement it in GUI::ButtonWidget to handle the hotkey.
|
||||
if (g_system->getOverlayWidth() > 320)
|
||||
_returnToLauncherButton->setLabel(_returnToLauncherButton->cleanupHotkey(_("~R~eturn to Launcher")));
|
||||
_returnToLauncherButton->setLabel(_returnToLauncherButton->cleanupHotkey(Common::convertToU32String(_("~R~eturn to Launcher"))));
|
||||
else
|
||||
_returnToLauncherButton->setLabel(_returnToLauncherButton->cleanupHotkey(_c("~R~eturn to Launcher", "lowres")));
|
||||
_returnToLauncherButton->setLabel(_returnToLauncherButton->cleanupHotkey(Common::convertToU32String(_c("~R~eturn to Launcher", "lowres"))));
|
||||
|
||||
#ifndef DISABLE_FANCY_THEMES
|
||||
if (g_gui.xmlEval()->getVar("Globals.ShowGlobalMenuLogo", 0) == 1 && g_gui.theme()->supportsImages()) {
|
||||
@ -186,7 +186,7 @@ void MainMenuDialog::reflowLayout() {
|
||||
} else {
|
||||
GUI::StaticTextWidget *title = (GUI::StaticTextWidget *)findWidget("GlobalMenu.Title");
|
||||
if (!title) {
|
||||
title = new GUI::StaticTextWidget(this, "GlobalMenu.Title", "ScummVM");
|
||||
title = new GUI::StaticTextWidget(this, "GlobalMenu.Title", Common::convertToU32String("ScummVM"));
|
||||
title->setAlign(Graphics::kTextAlignCenter);
|
||||
}
|
||||
|
||||
@ -282,7 +282,7 @@ ConfigDialog::ConfigDialog() :
|
||||
// The game specific options tab
|
||||
//
|
||||
|
||||
int tabId = tab->addTab(_("Game"), "GlobalConfig_Engine");
|
||||
int tabId = tab->addTab(Common::convertToU32String(_("Game")), "GlobalConfig_Engine");
|
||||
|
||||
if (g_engine->hasFeature(Engine::kSupportsChangingOptionsDuringRuntime)) {
|
||||
_engineOptions = metaEngine.buildEngineOptionsWidget(tab, "GlobalConfig_Engine.Container", gameDomain);
|
||||
@ -298,7 +298,7 @@ ConfigDialog::ConfigDialog() :
|
||||
// The Audio / Subtitles tab
|
||||
//
|
||||
|
||||
tab->addTab(_("Audio"), "GlobalConfig_Audio");
|
||||
tab->addTab(Common::convertToU32String(_("Audio")), "GlobalConfig_Audio");
|
||||
|
||||
//
|
||||
// Sound controllers
|
||||
@ -323,7 +323,7 @@ ConfigDialog::ConfigDialog() :
|
||||
|
||||
Common::KeymapArray keymaps = metaEngine.initKeymaps(gameDomain.c_str());
|
||||
if (!keymaps.empty()) {
|
||||
tab->addTab(_("Keymaps"), "GlobalConfig_KeyMapper");
|
||||
tab->addTab(Common::convertToU32String(_("Keymaps")), "GlobalConfig_KeyMapper");
|
||||
addKeyMapperControls(tab, "GlobalConfig_KeyMapper.", keymaps, gameDomain);
|
||||
}
|
||||
|
||||
@ -332,7 +332,7 @@ ConfigDialog::ConfigDialog() :
|
||||
//
|
||||
Common::AchievementsInfo achievementsInfo = metaEngine.getAchievementsInfo(gameDomain);
|
||||
if (achievementsInfo.descriptions.size() > 0) {
|
||||
tab->addTab(_("Achievements"), "GlobalConfig_Achievements");
|
||||
tab->addTab(Common::convertToU32String(_("Achievements")), "GlobalConfig_Achievements");
|
||||
addAchievementsControls(tab, "GlobalConfig_Achievements.", achievementsInfo);
|
||||
}
|
||||
|
||||
@ -343,8 +343,8 @@ ConfigDialog::ConfigDialog() :
|
||||
// Add the buttons
|
||||
//
|
||||
|
||||
new GUI::ButtonWidget(this, "GlobalConfig.Ok", _("~O~K"), 0, GUI::kOKCmd);
|
||||
new GUI::ButtonWidget(this, "GlobalConfig.Cancel", _("~C~ancel"), 0, GUI::kCloseCmd);
|
||||
new GUI::ButtonWidget(this, "GlobalConfig.Ok", Common::convertToU32String(_("~O~K")), 0, GUI::kOKCmd);
|
||||
new GUI::ButtonWidget(this, "GlobalConfig.Cancel", Common::convertToU32String(_("~C~ancel")), 0, GUI::kCloseCmd);
|
||||
|
||||
#ifdef GUI_ENABLE_KEYSDIALOG
|
||||
new GUI::ButtonWidget(this, "GlobalConfig.Keys", _("~K~eys"), 0, kKeysCmd);
|
||||
@ -408,7 +408,7 @@ ExtraGuiOptionsWidget::ExtraGuiOptionsWidget(GuiObject *containerBoss, const Com
|
||||
for (iter = _options.begin(); iter != _options.end(); ++iter, ++i) {
|
||||
Common::String id = Common::String::format("%d", i);
|
||||
_checkboxes.push_back(new CheckboxWidget(widgetsBoss(),
|
||||
_dialogLayout + ".customOption" + id + "Checkbox", _(iter->label), _(iter->tooltip)));
|
||||
_dialogLayout + ".customOption" + id + "Checkbox", Common::convertToU32String(_(iter->label)), _(iter->tooltip)));
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -940,10 +940,44 @@ void ThemeEngine::drawDDText(TextData type, TextColor color, const Common::Rect
|
||||
addDirtyRect(dirty);
|
||||
}
|
||||
|
||||
void ThemeEngine::drawDDText(TextData type, TextColor color, const Common::Rect &r, const Common::U32String &text,
|
||||
bool restoreBg, bool ellipsis, Graphics::TextAlign alignH, TextAlignVertical alignV,
|
||||
int deltax, const Common::Rect &drawableTextArea) {
|
||||
|
||||
if (type == kTextDataNone || !_texts[type] || _layerToDraw == kDrawLayerBackground)
|
||||
return;
|
||||
|
||||
Common::Rect area = r;
|
||||
area.clip(_screen.w, _screen.h);
|
||||
|
||||
Common::Rect dirty = drawableTextArea;
|
||||
if (dirty.isEmpty()) dirty = area;
|
||||
else dirty.clip(area);
|
||||
|
||||
if (!_clip.isEmpty()) {
|
||||
dirty.clip(_clip);
|
||||
}
|
||||
|
||||
// HACK: One small pixel should be invisible enough
|
||||
if (dirty.isEmpty()) dirty = Common::Rect(0, 0, 1, 1);
|
||||
|
||||
if (restoreBg)
|
||||
restoreBackground(dirty);
|
||||
|
||||
_vectorRenderer->setFgColor(_textColors[color]->r, _textColors[color]->g, _textColors[color]->b);
|
||||
#ifdef USE_TRANSLATION
|
||||
_vectorRenderer->drawString(_texts[type]->_fontPtr, TransMan.convertBiDiString(text), area, alignH, alignV, deltax, ellipsis, dirty);
|
||||
#else
|
||||
_vectorRenderer->drawString(_texts[type]->_fontPtr, text, area, alignH, alignV, deltax, ellipsis, dirty);
|
||||
#endif
|
||||
|
||||
addDirtyRect(dirty);
|
||||
}
|
||||
|
||||
/**********************************************************
|
||||
* Widget drawing functions
|
||||
*********************************************************/
|
||||
void ThemeEngine::drawButton(const Common::Rect &r, const Common::String &str, WidgetStateInfo state, uint16 hints) {
|
||||
void ThemeEngine::drawButton(const Common::Rect &r, const Common::U32String &str, WidgetStateInfo state, uint16 hints) {
|
||||
if (!ready())
|
||||
return;
|
||||
|
||||
@ -963,7 +997,7 @@ void ThemeEngine::drawButton(const Common::Rect &r, const Common::String &str, W
|
||||
_widgets[dd]->_textAlignV);
|
||||
}
|
||||
|
||||
void ThemeEngine::drawDropDownButton(const Common::Rect &r, uint32 dropdownWidth, const Common::String &str,
|
||||
void ThemeEngine::drawDropDownButton(const Common::Rect &r, uint32 dropdownWidth, const Common::U32String &str,
|
||||
ThemeEngine::WidgetStateInfo buttonState, bool inButton, bool inDropdown, bool rtl) {
|
||||
if (!ready())
|
||||
return;
|
||||
@ -1000,7 +1034,7 @@ void ThemeEngine::drawLineSeparator(const Common::Rect &r) {
|
||||
drawDD(kDDSeparator, r);
|
||||
}
|
||||
|
||||
void ThemeEngine::drawCheckbox(const Common::Rect &r, const Common::String &str, bool checked, WidgetStateInfo state, bool rtl) {
|
||||
void ThemeEngine::drawCheckbox(const Common::Rect &r, const Common::U32String &str, bool checked, WidgetStateInfo state, bool rtl) {
|
||||
if (!ready())
|
||||
return;
|
||||
|
||||
@ -1035,7 +1069,7 @@ void ThemeEngine::drawCheckbox(const Common::Rect &r, const Common::String &str,
|
||||
}
|
||||
}
|
||||
|
||||
void ThemeEngine::drawRadiobutton(const Common::Rect &r, const Common::String &str, bool checked, WidgetStateInfo state, bool rtl) {
|
||||
void ThemeEngine::drawRadiobutton(const Common::Rect &r, const Common::U32String &str, bool checked, WidgetStateInfo state, bool rtl) {
|
||||
if (!ready())
|
||||
return;
|
||||
|
||||
@ -1161,7 +1195,7 @@ void ThemeEngine::drawCaret(const Common::Rect &r, bool erase) {
|
||||
drawDD(kDDCaret, r);
|
||||
}
|
||||
|
||||
void ThemeEngine::drawPopUpWidget(const Common::Rect &r, const Common::String &sel, int deltax, WidgetStateInfo state, bool rtl) {
|
||||
void ThemeEngine::drawPopUpWidget(const Common::Rect &r, const Common::U32String &sel, int deltax, WidgetStateInfo state, bool rtl) {
|
||||
if (!ready())
|
||||
return;
|
||||
|
||||
@ -1228,7 +1262,7 @@ void ThemeEngine::drawWidgetBackground(const Common::Rect &r, WidgetBackground b
|
||||
}
|
||||
|
||||
void ThemeEngine::drawTab(const Common::Rect &r, int tabHeight, const Common::Array<int> &tabWidths,
|
||||
const Common::Array<Common::String> &tabs, int active, bool rtl) {
|
||||
const Common::Array<Common::U32String> &tabs, int active, bool rtl) {
|
||||
if (!ready())
|
||||
return;
|
||||
|
||||
@ -1279,7 +1313,7 @@ void ThemeEngine::drawTab(const Common::Rect &r, int tabHeight, const Common::Ar
|
||||
}
|
||||
}
|
||||
|
||||
void ThemeEngine::drawText(const Common::Rect &r, const Common::String &str, WidgetStateInfo state,
|
||||
void ThemeEngine::drawText(const Common::Rect &r, const Common::U32String &str, WidgetStateInfo state,
|
||||
Graphics::TextAlign align, TextInversionState inverted, int deltax, bool useEllipsis,
|
||||
FontStyle font, FontColor color, bool restore, const Common::Rect &drawableTextArea) {
|
||||
if (!ready())
|
||||
|
@ -416,28 +416,28 @@ public:
|
||||
|
||||
void drawWidgetBackground(const Common::Rect &r, WidgetBackground background);
|
||||
|
||||
void drawButton(const Common::Rect &r, const Common::String &str, WidgetStateInfo state = kStateEnabled,
|
||||
void drawButton(const Common::Rect &r, const Common::U32String &str, WidgetStateInfo state = kStateEnabled,
|
||||
uint16 hints = 0);
|
||||
|
||||
void drawDropDownButton(const Common::Rect &r, uint32 dropdownWidth, const Common::String &str,
|
||||
void drawDropDownButton(const Common::Rect &r, uint32 dropdownWidth, const Common::U32String &str,
|
||||
WidgetStateInfo buttonState, bool inButton, bool inDropdown, bool rtl = false);
|
||||
|
||||
void drawSurface(const Common::Point &p, const Graphics::Surface &surface, bool themeTrans = false);
|
||||
|
||||
void drawSlider(const Common::Rect &r, int width, WidgetStateInfo state = kStateEnabled, bool rtl = false);
|
||||
|
||||
void drawCheckbox(const Common::Rect &r, const Common::String &str, bool checked,
|
||||
void drawCheckbox(const Common::Rect &r, const Common::U32String &str, bool checked,
|
||||
WidgetStateInfo state = kStateEnabled, bool rtl = false);
|
||||
|
||||
void drawRadiobutton(const Common::Rect &r, const Common::String &str, bool checked,
|
||||
void drawRadiobutton(const Common::Rect &r, const Common::U32String &str, bool checked,
|
||||
WidgetStateInfo state = kStateEnabled, bool rtl = false);
|
||||
|
||||
void drawTab(const Common::Rect &r, int tabHeight, const Common::Array<int> &tabWidths,
|
||||
const Common::Array<Common::String> &tabs, int active, bool rtl = false);
|
||||
const Common::Array<Common::U32String> &tabs, int active, bool rtl = false);
|
||||
|
||||
void drawScrollbar(const Common::Rect &r, int sliderY, int sliderHeight, ScrollbarState scrollState);
|
||||
|
||||
void drawPopUpWidget(const Common::Rect &r, const Common::String &sel, int deltax,
|
||||
void drawPopUpWidget(const Common::Rect &r, const Common::U32String &sel, int deltax,
|
||||
WidgetStateInfo state = kStateEnabled, bool rtl = false);
|
||||
|
||||
void drawCaret(const Common::Rect &r, bool erase);
|
||||
@ -446,7 +446,7 @@ public:
|
||||
|
||||
void drawDialogBackground(const Common::Rect &r, DialogBackground type);
|
||||
|
||||
void drawText(const Common::Rect &r, const Common::String &str, WidgetStateInfo state = kStateEnabled,
|
||||
void drawText(const Common::Rect &r, const Common::U32String &str, WidgetStateInfo state = kStateEnabled,
|
||||
Graphics::TextAlign align = Graphics::kTextAlignCenter,
|
||||
TextInversionState inverted = kTextInversionNone, int deltax = 0, bool useEllipsis = true,
|
||||
FontStyle font = kFontStyleBold, FontColor color = kFontColorNormal, bool restore = true,
|
||||
@ -660,6 +660,10 @@ protected:
|
||||
bool elipsis, Graphics::TextAlign alignH = Graphics::kTextAlignLeft,
|
||||
TextAlignVertical alignV = kTextAlignVTop, int deltax = 0,
|
||||
const Common::Rect &drawableTextArea = Common::Rect(0, 0, 0, 0));
|
||||
void drawDDText(TextData type, TextColor color, const Common::Rect &r, const Common::U32String &text, bool restoreBg,
|
||||
bool elipsis, Graphics::TextAlign alignH = Graphics::kTextAlignLeft,
|
||||
TextAlignVertical alignV = kTextAlignVTop, int deltax = 0,
|
||||
const Common::Rect &drawableTextArea = Common::Rect(0, 0, 0, 0));
|
||||
|
||||
/**
|
||||
* DEBUG: Draws a white square and writes some text next to it.
|
||||
|
@ -251,7 +251,7 @@ void AboutDialog::drawDialog(DrawLayer layerToDraw) {
|
||||
|
||||
if (*str)
|
||||
g_gui.theme()->drawText(Common::Rect(_x + _xOff, y, _x + _w - _xOff, y + g_gui.theme()->getFontHeight()),
|
||||
str, state, align, ThemeEngine::kTextInversionNone, 0, false,
|
||||
Common::convertToU32String(str), state, align, ThemeEngine::kTextInversionNone, 0, false,
|
||||
ThemeEngine::kFontStyleBold, ThemeEngine::kFontColorNormal, true, _textDrawableArea);
|
||||
y += _lineHeight;
|
||||
}
|
||||
|
@ -59,7 +59,7 @@ BrowserDialog::BrowserDialog(const char *title, bool dirBrowser)
|
||||
_showHidden = false;
|
||||
|
||||
// Headline - TODO: should be customizable during creation time
|
||||
new StaticTextWidget(this, "Browser.Headline", title);
|
||||
new StaticTextWidget(this, "Browser.Headline", Common::convertToU32String(title));
|
||||
|
||||
// Current path - TODO: handle long paths ?
|
||||
_currentPath = new EditTextWidget(this, "Browser.Path", "", nullptr, 0, kPathEditedCmd);
|
||||
@ -72,15 +72,15 @@ BrowserDialog::BrowserDialog(const char *title, bool dirBrowser)
|
||||
_backgroundType = GUI::ThemeEngine::kDialogBackgroundPlain;
|
||||
|
||||
// Checkbox for the "show hidden files" state.
|
||||
_showHiddenWidget = new CheckboxWidget(this, "Browser.Hidden", _("Show hidden files"), _("Show files marked with the hidden attribute"), kHiddenCmd);
|
||||
_showHiddenWidget = new CheckboxWidget(this, "Browser.Hidden", Common::convertToU32String(_("Show hidden files")), _("Show files marked with the hidden attribute"), kHiddenCmd);
|
||||
|
||||
// Buttons
|
||||
if (g_system->getOverlayWidth() > 320)
|
||||
new ButtonWidget(this, "Browser.Up", _("Go up"), _("Go to previous directory level"), kGoUpCmd);
|
||||
new ButtonWidget(this, "Browser.Up", Common::convertToU32String(_("Go up")), _("Go to previous directory level"), kGoUpCmd);
|
||||
else
|
||||
new ButtonWidget(this, "Browser.Up", _c("Go up", "lowres"), _("Go to previous directory level"), kGoUpCmd);
|
||||
new ButtonWidget(this, "Browser.Cancel", _("Cancel"), nullptr, kCloseCmd);
|
||||
new ButtonWidget(this, "Browser.Choose", _("Choose"), nullptr, kChooseCmd);
|
||||
new ButtonWidget(this, "Browser.Up", Common::convertToU32String(_c("Go up", "lowres")), _("Go to previous directory level"), kGoUpCmd);
|
||||
new ButtonWidget(this, "Browser.Cancel", Common::convertToU32String(_("Cancel")), nullptr, kCloseCmd);
|
||||
new ButtonWidget(this, "Browser.Choose", Common::convertToU32String(_("Choose")), nullptr, kChooseCmd);
|
||||
}
|
||||
|
||||
int BrowserDialog::runModal() {
|
||||
|
@ -43,8 +43,8 @@ ChooserDialog::ChooserDialog(const String &title, String dialogId)
|
||||
_list->setEditable(false);
|
||||
|
||||
// Buttons
|
||||
new ButtonWidget(this, dialogId + ".Cancel", _("Cancel"), nullptr, kCloseCmd);
|
||||
_chooseButton = new ButtonWidget(this, dialogId + ".Choose", _("Choose"), nullptr, kChooseCmd);
|
||||
new ButtonWidget(this, dialogId + ".Cancel", Common::convertToU32String(_("Cancel")), nullptr, kCloseCmd);
|
||||
_chooseButton = new ButtonWidget(this, dialogId + ".Choose", Common::convertToU32String(_("Choose")), nullptr, kChooseCmd);
|
||||
_chooseButton->setEnabled(false);
|
||||
}
|
||||
|
||||
|
@ -49,8 +49,8 @@ DownloadDialog::DownloadDialog(uint32 storageId, LauncherDialog *launcher) :
|
||||
_browser = new BrowserDialog(_("Select directory where to download game data"), true);
|
||||
_remoteBrowser = new RemoteBrowserDialog(_("Select directory with game data"));
|
||||
|
||||
_remoteDirectoryLabel = new StaticTextWidget(this, "GlobalOptions_Cloud_DownloadDialog.RemoteDirectory", _("From: "));
|
||||
_localDirectoryLabel = new StaticTextWidget(this, "GlobalOptions_Cloud_DownloadDialog.LocalDirectory", _("To: "));
|
||||
_remoteDirectoryLabel = new StaticTextWidget(this, "GlobalOptions_Cloud_DownloadDialog.RemoteDirectory", Common::convertToU32String(_("From: ")));
|
||||
_localDirectoryLabel = new StaticTextWidget(this, "GlobalOptions_Cloud_DownloadDialog.LocalDirectory", Common::convertToU32String(_("To: ")));
|
||||
uint32 progress = (uint32)(100 * CloudMan.getDownloadingProgress());
|
||||
_progressBar = new SliderWidget(this, "GlobalOptions_Cloud_DownloadDialog.ProgressBar");
|
||||
_progressBar->setMinValue(0);
|
||||
@ -58,14 +58,14 @@ DownloadDialog::DownloadDialog(uint32 storageId, LauncherDialog *launcher) :
|
||||
_progressBar->setValue(progress);
|
||||
_progressBar->setEnabled(false);
|
||||
_percentLabel = new StaticTextWidget(this, "GlobalOptions_Cloud_DownloadDialog.PercentText", Common::String::format("%u %%", progress));
|
||||
_downloadSizeLabel = new StaticTextWidget(this, "GlobalOptions_Cloud_DownloadDialog.DownloadSize", "");
|
||||
_downloadSpeedLabel = new StaticTextWidget(this, "GlobalOptions_Cloud_DownloadDialog.DownloadSpeed", "");
|
||||
_downloadSizeLabel = new StaticTextWidget(this, "GlobalOptions_Cloud_DownloadDialog.DownloadSize", Common::convertToU32String(""));
|
||||
_downloadSpeedLabel = new StaticTextWidget(this, "GlobalOptions_Cloud_DownloadDialog.DownloadSpeed", Common::convertToU32String(""));
|
||||
if (g_system->getOverlayWidth() > 320)
|
||||
_cancelButton = new ButtonWidget(this, "GlobalOptions_Cloud_DownloadDialog.MainButton", _("Cancel download"), nullptr, kDownloadDialogButtonCmd);
|
||||
_cancelButton = new ButtonWidget(this, "GlobalOptions_Cloud_DownloadDialog.MainButton", Common::convertToU32String(_("Cancel download")), nullptr, kDownloadDialogButtonCmd);
|
||||
else
|
||||
_cancelButton = new ButtonWidget(this, "GlobalOptions_Cloud_DownloadDialog.MainButton", _c("Cancel download", "lowres"), nullptr, kDownloadDialogButtonCmd);
|
||||
_cancelButton = new ButtonWidget(this, "GlobalOptions_Cloud_DownloadDialog.MainButton", Common::convertToU32String(_c("Cancel download", "lowres")), nullptr, kDownloadDialogButtonCmd);
|
||||
|
||||
_closeButton = new ButtonWidget(this, "GlobalOptions_Cloud_DownloadDialog.CloseButton", _("Hide"), nullptr, kCloseCmd);
|
||||
_closeButton = new ButtonWidget(this, "GlobalOptions_Cloud_DownloadDialog.CloseButton", Common::convertToU32String(_("Hide")), nullptr, kCloseCmd);
|
||||
refreshWidgets();
|
||||
|
||||
CloudMan.setDownloadTarget(this);
|
||||
|
@ -132,44 +132,44 @@ EditGameDialog::EditGameDialog(const String &domain)
|
||||
//
|
||||
// 1) The game tab
|
||||
//
|
||||
tab->addTab(_("Game"), "GameOptions_Game");
|
||||
tab->addTab(Common::convertToU32String(_("Game")), "GameOptions_Game");
|
||||
|
||||
// GUI: Label & edit widget for the game ID
|
||||
if (g_system->getOverlayWidth() > 320)
|
||||
new StaticTextWidget(tab, "GameOptions_Game.Id", _("ID:"), _("Short game identifier used for referring to saved games and running the game from the command line"));
|
||||
new StaticTextWidget(tab, "GameOptions_Game.Id", Common::convertToU32String(_("ID:")), _("Short game identifier used for referring to saved games and running the game from the command line"));
|
||||
else
|
||||
new StaticTextWidget(tab, "GameOptions_Game.Id", _c("ID:", "lowres"), _("Short game identifier used for referring to saved games and running the game from the command line"));
|
||||
new StaticTextWidget(tab, "GameOptions_Game.Id", Common::convertToU32String(_c("ID:", "lowres")), _("Short game identifier used for referring to saved games and running the game from the command line"));
|
||||
_domainWidget = new DomainEditTextWidget(tab, "GameOptions_Game.Domain", _domain, _("Short game identifier used for referring to saved games and running the game from the command line"));
|
||||
|
||||
// GUI: Label & edit widget for the description
|
||||
if (g_system->getOverlayWidth() > 320)
|
||||
new StaticTextWidget(tab, "GameOptions_Game.Name", _("Name:"), _("Full title of the game"));
|
||||
new StaticTextWidget(tab, "GameOptions_Game.Name", Common::convertToU32String(_("Name:")), _("Full title of the game"));
|
||||
else
|
||||
new StaticTextWidget(tab, "GameOptions_Game.Name", _c("Name:", "lowres"), _("Full title of the game"));
|
||||
new StaticTextWidget(tab, "GameOptions_Game.Name", Common::convertToU32String(_c("Name:", "lowres")), _("Full title of the game"));
|
||||
_descriptionWidget = new EditTextWidget(tab, "GameOptions_Game.Desc", description, _("Full title of the game"));
|
||||
|
||||
// Language popup
|
||||
_langPopUpDesc = new StaticTextWidget(tab, "GameOptions_Game.LangPopupDesc", _("Language:"), _("Language of the game. This will not turn your Spanish game version into English"));
|
||||
_langPopUpDesc = new StaticTextWidget(tab, "GameOptions_Game.LangPopupDesc", Common::convertToU32String(_("Language:")), _("Language of the game. This will not turn your Spanish game version into English"));
|
||||
_langPopUp = new PopUpWidget(tab, "GameOptions_Game.LangPopup", _("Language of the game. This will not turn your Spanish game version into English"));
|
||||
_langPopUp->appendEntry(_("<default>"), (uint32)Common::UNK_LANG);
|
||||
_langPopUp->appendEntry("", (uint32)Common::UNK_LANG);
|
||||
_langPopUp->appendEntry(Common::convertToU32String(_("<default>")), (uint32)Common::UNK_LANG);
|
||||
_langPopUp->appendEntry(Common::convertToU32String(""), (uint32)Common::UNK_LANG);
|
||||
const Common::LanguageDescription *l = Common::g_languages;
|
||||
for (; l->code; ++l) {
|
||||
if (checkGameGUIOptionLanguage(l->id, _guioptionsString))
|
||||
_langPopUp->appendEntry(l->description, l->id);
|
||||
_langPopUp->appendEntry(Common::convertToU32String(l->description), l->id);
|
||||
}
|
||||
|
||||
// Platform popup
|
||||
if (g_system->getOverlayWidth() > 320)
|
||||
_platformPopUpDesc = new StaticTextWidget(tab, "GameOptions_Game.PlatformPopupDesc", _("Platform:"), _("Platform the game was originally designed for"));
|
||||
_platformPopUpDesc = new StaticTextWidget(tab, "GameOptions_Game.PlatformPopupDesc", Common::convertToU32String(_("Platform:")), _("Platform the game was originally designed for"));
|
||||
else
|
||||
_platformPopUpDesc = new StaticTextWidget(tab, "GameOptions_Game.PlatformPopupDesc", _c("Platform:", "lowres"), _("Platform the game was originally designed for"));
|
||||
_platformPopUpDesc = new StaticTextWidget(tab, "GameOptions_Game.PlatformPopupDesc", Common::convertToU32String(_c("Platform:", "lowres")), _("Platform the game was originally designed for"));
|
||||
_platformPopUp = new PopUpWidget(tab, "GameOptions_Game.PlatformPopup", _("Platform the game was originally designed for"));
|
||||
_platformPopUp->appendEntry(_("<default>"));
|
||||
_platformPopUp->appendEntry("");
|
||||
_platformPopUp->appendEntry(Common::convertToU32String(_("<default>")));
|
||||
_platformPopUp->appendEntry(Common::convertToU32String(""));
|
||||
const Common::PlatformDescription *p = Common::g_platforms;
|
||||
for (; p->code; ++p) {
|
||||
_platformPopUp->appendEntry(p->description, p->id);
|
||||
_platformPopUp->appendEntry(Common::convertToU32String(p->description), p->id);
|
||||
}
|
||||
|
||||
//
|
||||
@ -177,7 +177,7 @@ EditGameDialog::EditGameDialog(const String &domain)
|
||||
//
|
||||
|
||||
if (plugin) {
|
||||
int tabId = tab->addTab(_("Engine"), "GameOptions_Engine");
|
||||
int tabId = tab->addTab(Common::convertToU32String(_("Engine")), "GameOptions_Engine");
|
||||
|
||||
const MetaEngine &metaEngine = plugin->get<MetaEngine>();
|
||||
metaEngine.registerDefaultSettings(_domain);
|
||||
@ -193,15 +193,15 @@ EditGameDialog::EditGameDialog(const String &domain)
|
||||
//
|
||||
// 3) The graphics tab
|
||||
//
|
||||
_graphicsTabId = tab->addTab(g_system->getOverlayWidth() > 320 ? _("Graphics") : _("GFX"), "GameOptions_Graphics");
|
||||
_graphicsTabId = tab->addTab(g_system->getOverlayWidth() > 320 ? Common::convertToU32String(_("Graphics")) : Common::convertToU32String(_("GFX")), "GameOptions_Graphics");
|
||||
ScrollContainerWidget *graphicsContainer = new ScrollContainerWidget(tab, "GameOptions_Graphics.Container", "GameOptions_Graphics_Container", kGraphicsTabContainerReflowCmd);
|
||||
graphicsContainer->setBackgroundType(ThemeEngine::kWidgetBackgroundNo);
|
||||
graphicsContainer->setTarget(this);
|
||||
|
||||
if (g_system->getOverlayWidth() > 320)
|
||||
_globalGraphicsOverride = new CheckboxWidget(graphicsContainer, "GameOptions_Graphics_Container.EnableTabCheckbox", _("Override global graphic settings"), nullptr, kCmdGlobalGraphicsOverride);
|
||||
_globalGraphicsOverride = new CheckboxWidget(graphicsContainer, "GameOptions_Graphics_Container.EnableTabCheckbox", Common::convertToU32String(_("Override global graphic settings")), nullptr, kCmdGlobalGraphicsOverride);
|
||||
else
|
||||
_globalGraphicsOverride = new CheckboxWidget(graphicsContainer, "GameOptions_Graphics_Container.EnableTabCheckbox", _c("Override global graphic settings", "lowres"), nullptr, kCmdGlobalGraphicsOverride);
|
||||
_globalGraphicsOverride = new CheckboxWidget(graphicsContainer, "GameOptions_Graphics_Container.EnableTabCheckbox", Common::convertToU32String(_c("Override global graphic settings", "lowres")), nullptr, kCmdGlobalGraphicsOverride);
|
||||
|
||||
addGraphicControls(graphicsContainer, "GameOptions_Graphics_Container.");
|
||||
|
||||
@ -211,12 +211,12 @@ EditGameDialog::EditGameDialog(const String &domain)
|
||||
|
||||
_globalShaderOverride = nullptr;
|
||||
if (g_system->hasFeature(OSystem::kFeatureShader)) {
|
||||
tab->addTab(_("Shader"), "GameOptions_Shader");
|
||||
tab->addTab(Common::convertToU32String(_("Shader")), "GameOptions_Shader");
|
||||
|
||||
if (g_system->getOverlayWidth() > 320)
|
||||
_globalShaderOverride = new CheckboxWidget(tab, "GameOptions_Shader.EnableTabCheckbox", _("Override global shader settings"), nullptr, kCmdGlobalShaderOverride);
|
||||
_globalShaderOverride = new CheckboxWidget(tab, "GameOptions_Shader.EnableTabCheckbox", Common::convertToU32String(_("Override global shader settings")), nullptr, kCmdGlobalShaderOverride);
|
||||
else
|
||||
_globalShaderOverride = new CheckboxWidget(tab, "GameOptions_Shader.EnableTabCheckbox", _c("Override global shader settings", "lowres"), nullptr, kCmdGlobalShaderOverride);
|
||||
_globalShaderOverride = new CheckboxWidget(tab, "GameOptions_Shader.EnableTabCheckbox", Common::convertToU32String(_c("Override global shader settings", "lowres")), nullptr, kCmdGlobalShaderOverride);
|
||||
|
||||
addShaderControls(tab, "GameOptions_Shader.");
|
||||
}
|
||||
@ -230,19 +230,19 @@ EditGameDialog::EditGameDialog(const String &domain)
|
||||
}
|
||||
|
||||
if (!keymaps.empty()) {
|
||||
tab->addTab(_("Keymaps"), "GameOptions_KeyMapper");
|
||||
tab->addTab(Common::convertToU32String(_("Keymaps")), "GameOptions_KeyMapper");
|
||||
addKeyMapperControls(tab, "GameOptions_KeyMapper.", keymaps, domain);
|
||||
}
|
||||
|
||||
//
|
||||
// 4) The audio tab
|
||||
//
|
||||
tab->addTab(_("Audio"), "GameOptions_Audio");
|
||||
tab->addTab(Common::convertToU32String(_("Audio")), "GameOptions_Audio");
|
||||
|
||||
if (g_system->getOverlayWidth() > 320)
|
||||
_globalAudioOverride = new CheckboxWidget(tab, "GameOptions_Audio.EnableTabCheckbox", _("Override global audio settings"), nullptr, kCmdGlobalAudioOverride);
|
||||
_globalAudioOverride = new CheckboxWidget(tab, "GameOptions_Audio.EnableTabCheckbox", Common::convertToU32String(_("Override global audio settings")), nullptr, kCmdGlobalAudioOverride);
|
||||
else
|
||||
_globalAudioOverride = new CheckboxWidget(tab, "GameOptions_Audio.EnableTabCheckbox", _c("Override global audio settings", "lowres"), nullptr, kCmdGlobalAudioOverride);
|
||||
_globalAudioOverride = new CheckboxWidget(tab, "GameOptions_Audio.EnableTabCheckbox", Common::convertToU32String(_c("Override global audio settings", "lowres")), nullptr, kCmdGlobalAudioOverride);
|
||||
|
||||
addAudioControls(tab, "GameOptions_Audio.");
|
||||
addSubtitleControls(tab, "GameOptions_Audio.");
|
||||
@ -251,14 +251,14 @@ EditGameDialog::EditGameDialog(const String &domain)
|
||||
// 5) The volume tab
|
||||
//
|
||||
if (g_system->getOverlayWidth() > 320)
|
||||
tab->addTab(_("Volume"), "GameOptions_Volume");
|
||||
tab->addTab(Common::convertToU32String(_("Volume")), "GameOptions_Volume");
|
||||
else
|
||||
tab->addTab(_c("Volume", "lowres"), "GameOptions_Volume");
|
||||
tab->addTab(Common::convertToU32String(_c("Volume", "lowres")), "GameOptions_Volume");
|
||||
|
||||
if (g_system->getOverlayWidth() > 320)
|
||||
_globalVolumeOverride = new CheckboxWidget(tab, "GameOptions_Volume.EnableTabCheckbox", _("Override global volume settings"), nullptr, kCmdGlobalVolumeOverride);
|
||||
_globalVolumeOverride = new CheckboxWidget(tab, "GameOptions_Volume.EnableTabCheckbox", Common::convertToU32String(_("Override global volume settings")), nullptr, kCmdGlobalVolumeOverride);
|
||||
else
|
||||
_globalVolumeOverride = new CheckboxWidget(tab, "GameOptions_Volume.EnableTabCheckbox", _c("Override global volume settings", "lowres"), nullptr, kCmdGlobalVolumeOverride);
|
||||
_globalVolumeOverride = new CheckboxWidget(tab, "GameOptions_Volume.EnableTabCheckbox", Common::convertToU32String(_c("Override global volume settings", "lowres")), nullptr, kCmdGlobalVolumeOverride);
|
||||
|
||||
addVolumeControls(tab, "GameOptions_Volume.");
|
||||
|
||||
@ -269,12 +269,12 @@ EditGameDialog::EditGameDialog(const String &domain)
|
||||
//
|
||||
_globalMIDIOverride = nullptr;
|
||||
if (showMidi) {
|
||||
tab->addTab(_("MIDI"), "GameOptions_MIDI");
|
||||
tab->addTab(Common::convertToU32String(_("MIDI")), "GameOptions_MIDI");
|
||||
|
||||
if (g_system->getOverlayWidth() > 320)
|
||||
_globalMIDIOverride = new CheckboxWidget(tab, "GameOptions_MIDI.EnableTabCheckbox", _("Override global MIDI settings"), nullptr, kCmdGlobalMIDIOverride);
|
||||
_globalMIDIOverride = new CheckboxWidget(tab, "GameOptions_MIDI.EnableTabCheckbox", Common::convertToU32String(_("Override global MIDI settings")), nullptr, kCmdGlobalMIDIOverride);
|
||||
else
|
||||
_globalMIDIOverride = new CheckboxWidget(tab, "GameOptions_MIDI.EnableTabCheckbox", _c("Override global MIDI settings", "lowres"), nullptr, kCmdGlobalMIDIOverride);
|
||||
_globalMIDIOverride = new CheckboxWidget(tab, "GameOptions_MIDI.EnableTabCheckbox", Common::convertToU32String(_c("Override global MIDI settings", "lowres")), nullptr, kCmdGlobalMIDIOverride);
|
||||
|
||||
addMIDIControls(tab, "GameOptions_MIDI.");
|
||||
}
|
||||
@ -284,12 +284,12 @@ EditGameDialog::EditGameDialog(const String &domain)
|
||||
//
|
||||
_globalMT32Override = nullptr;
|
||||
if (showMidi) {
|
||||
tab->addTab(_("MT-32"), "GameOptions_MT32");
|
||||
tab->addTab(Common::convertToU32String(_("MT-32")), "GameOptions_MT32");
|
||||
|
||||
if (g_system->getOverlayWidth() > 320)
|
||||
_globalMT32Override = new CheckboxWidget(tab, "GameOptions_MT32.EnableTabCheckbox", _("Override global MT-32 settings"), nullptr, kCmdGlobalMT32Override);
|
||||
_globalMT32Override = new CheckboxWidget(tab, "GameOptions_MT32.EnableTabCheckbox", Common::convertToU32String(_("Override global MT-32 settings")), nullptr, kCmdGlobalMT32Override);
|
||||
else
|
||||
_globalMT32Override = new CheckboxWidget(tab, "GameOptions_MT32.EnableTabCheckbox", _c("Override global MT-32 settings", "lowres"), nullptr, kCmdGlobalMT32Override);
|
||||
_globalMT32Override = new CheckboxWidget(tab, "GameOptions_MT32.EnableTabCheckbox", Common::convertToU32String(_c("Override global MT-32 settings", "lowres")), nullptr, kCmdGlobalMT32Override);
|
||||
|
||||
addMT32Controls(tab, "GameOptions_MT32.");
|
||||
}
|
||||
@ -298,34 +298,34 @@ EditGameDialog::EditGameDialog(const String &domain)
|
||||
// 8) The Paths tab
|
||||
//
|
||||
if (g_system->getOverlayWidth() > 320)
|
||||
tab->addTab(_("Paths"), "GameOptions_Paths");
|
||||
tab->addTab(Common::convertToU32String(_("Paths")), "GameOptions_Paths");
|
||||
else
|
||||
tab->addTab(_c("Paths", "lowres"), "GameOptions_Paths");
|
||||
tab->addTab(Common::convertToU32String(_c("Paths", "lowres")), "GameOptions_Paths");
|
||||
|
||||
// These buttons have to be extra wide, or the text will be truncated
|
||||
// in the small version of the GUI.
|
||||
|
||||
// GUI: Button + Label for the game path
|
||||
if (g_system->getOverlayWidth() > 320)
|
||||
new ButtonWidget(tab, "GameOptions_Paths.Gamepath", _("Game Path:"), nullptr, kCmdGameBrowser);
|
||||
new ButtonWidget(tab, "GameOptions_Paths.Gamepath", Common::convertToU32String(_("Game Path:")), nullptr, kCmdGameBrowser);
|
||||
else
|
||||
new ButtonWidget(tab, "GameOptions_Paths.Gamepath", _c("Game Path:", "lowres"), nullptr, kCmdGameBrowser);
|
||||
new ButtonWidget(tab, "GameOptions_Paths.Gamepath", Common::convertToU32String(_c("Game Path:", "lowres")), nullptr, kCmdGameBrowser);
|
||||
_gamePathWidget = new StaticTextWidget(tab, "GameOptions_Paths.GamepathText", gamePath);
|
||||
|
||||
// GUI: Button + Label for the additional path
|
||||
if (g_system->getOverlayWidth() > 320)
|
||||
new ButtonWidget(tab, "GameOptions_Paths.Extrapath", _("Extra Path:"), _("Specifies path to additional data used by the game"), kCmdExtraBrowser);
|
||||
new ButtonWidget(tab, "GameOptions_Paths.Extrapath", Common::convertToU32String(_("Extra Path:")), _("Specifies path to additional data used by the game"), kCmdExtraBrowser);
|
||||
else
|
||||
new ButtonWidget(tab, "GameOptions_Paths.Extrapath", _c("Extra Path:", "lowres"), _("Specifies path to additional data used by the game"), kCmdExtraBrowser);
|
||||
new ButtonWidget(tab, "GameOptions_Paths.Extrapath", Common::convertToU32String(_c("Extra Path:", "lowres")), _("Specifies path to additional data used by the game"), kCmdExtraBrowser);
|
||||
_extraPathWidget = new StaticTextWidget(tab, "GameOptions_Paths.ExtrapathText", extraPath, _("Specifies path to additional data used by the game"));
|
||||
|
||||
_extraPathClearButton = addClearButton(tab, "GameOptions_Paths.ExtraPathClearButton", kCmdExtraPathClear);
|
||||
|
||||
// GUI: Button + Label for the save path
|
||||
if (g_system->getOverlayWidth() > 320)
|
||||
new ButtonWidget(tab, "GameOptions_Paths.Savepath", _("Save Path:"), _("Specifies where your saved games are put"), kCmdSaveBrowser);
|
||||
new ButtonWidget(tab, "GameOptions_Paths.Savepath", Common::convertToU32String(_("Save Path:")), _("Specifies where your saved games are put"), kCmdSaveBrowser);
|
||||
else
|
||||
new ButtonWidget(tab, "GameOptions_Paths.Savepath", _c("Save Path:", "lowres"), _("Specifies where your saved games are put"), kCmdSaveBrowser);
|
||||
new ButtonWidget(tab, "GameOptions_Paths.Savepath", Common::convertToU32String(_c("Save Path:", "lowres")), _("Specifies where your saved games are put"), kCmdSaveBrowser);
|
||||
_savePathWidget = new StaticTextWidget(tab, "GameOptions_Paths.SavepathText", savePath, _("Specifies where your saved games are put"));
|
||||
|
||||
_savePathClearButton = addClearButton(tab, "GameOptions_Paths.SavePathClearButton", kCmdSavePathClear);
|
||||
@ -337,7 +337,7 @@ EditGameDialog::EditGameDialog(const String &domain)
|
||||
const MetaEngine &metaEngine = plugin->get<MetaEngine>();
|
||||
Common::AchievementsInfo achievementsInfo = metaEngine.getAchievementsInfo(domain);
|
||||
if (achievementsInfo.descriptions.size() > 0) {
|
||||
tab->addTab(_("Achievements"), "GameOptions_Achievements");
|
||||
tab->addTab(Common::convertToU32String(_("Achievements")), "GameOptions_Achievements");
|
||||
addAchievementsControls(tab, "GameOptions_Achievements.", achievementsInfo);
|
||||
}
|
||||
}
|
||||
@ -347,8 +347,8 @@ EditGameDialog::EditGameDialog(const String &domain)
|
||||
_tabWidget = tab;
|
||||
|
||||
// Add OK & Cancel buttons
|
||||
new ButtonWidget(this, "GameOptions.Cancel", _("Cancel"), nullptr, kCloseCmd);
|
||||
new ButtonWidget(this, "GameOptions.Ok", _("OK"), nullptr, kOKCmd);
|
||||
new ButtonWidget(this, "GameOptions.Cancel", Common::convertToU32String(_("Cancel")), nullptr, kCloseCmd);
|
||||
new ButtonWidget(this, "GameOptions.Ok", Common::convertToU32String(_("OK")), nullptr, kOKCmd);
|
||||
}
|
||||
|
||||
void EditGameDialog::setupGraphicsTab() {
|
||||
@ -361,12 +361,12 @@ void EditGameDialog::open() {
|
||||
|
||||
String extraPath(ConfMan.get("extrapath", _domain));
|
||||
if (extraPath.empty() || !ConfMan.hasKey("extrapath", _domain)) {
|
||||
_extraPathWidget->setLabel(_c("None", "path"));
|
||||
_extraPathWidget->setLabel(Common::convertToU32String(_c("None", "path")));
|
||||
}
|
||||
|
||||
String savePath(ConfMan.get("savepath", _domain));
|
||||
if (savePath.empty() || !ConfMan.hasKey("savepath", _domain)) {
|
||||
_savePathWidget->setLabel(_("Default"));
|
||||
_savePathWidget->setLabel(Common::convertToU32String(_("Default")));
|
||||
}
|
||||
|
||||
int sel, i;
|
||||
@ -446,17 +446,17 @@ void EditGameDialog::apply() {
|
||||
else
|
||||
ConfMan.set("language", Common::getLanguageCode(lang), _domain);
|
||||
|
||||
String gamePath(_gamePathWidget->getLabel());
|
||||
String gamePath(Common::convertFromU32String(_gamePathWidget->getLabel()));
|
||||
if (!gamePath.empty())
|
||||
ConfMan.set("path", gamePath, _domain);
|
||||
|
||||
String extraPath(_extraPathWidget->getLabel());
|
||||
String extraPath(Common::convertFromU32String(_extraPathWidget->getLabel()));
|
||||
if (!extraPath.empty() && (extraPath != _c("None", "path")))
|
||||
ConfMan.set("extrapath", extraPath, _domain);
|
||||
else
|
||||
ConfMan.removeKey("extrapath", _domain);
|
||||
|
||||
String savePath(_savePathWidget->getLabel());
|
||||
String savePath(Common::convertFromU32String(_savePathWidget->getLabel()));
|
||||
if (!savePath.empty() && (savePath != _("Default")))
|
||||
ConfMan.set("savepath", savePath, _domain);
|
||||
else
|
||||
@ -574,11 +574,11 @@ void EditGameDialog::handleCommand(CommandSender *sender, uint32 cmd, uint32 dat
|
||||
}
|
||||
|
||||
case kCmdExtraPathClear:
|
||||
_extraPathWidget->setLabel(_c("None", "path"));
|
||||
_extraPathWidget->setLabel(Common::convertToU32String(_c("None", "path")));
|
||||
break;
|
||||
|
||||
case kCmdSavePathClear:
|
||||
_savePathWidget->setLabel(_("Default"));
|
||||
_savePathWidget->setLabel(Common::convertToU32String(_("Default")));
|
||||
break;
|
||||
|
||||
case kOKCmd:
|
||||
|
@ -46,8 +46,8 @@ FileBrowserDialog::FileBrowserDialog(const char *title, const char *fileExtensio
|
||||
_fileMask += fileExtension;
|
||||
_fileList = nullptr;
|
||||
|
||||
new StaticTextWidget(this, "FileBrowser.Headline", title ? title :
|
||||
mode == kFBModeLoad ? _("Choose file for loading") : _("Enter filename for saving"));
|
||||
new StaticTextWidget(this, "FileBrowser.Headline", title ? Common::convertToU32String(title) :
|
||||
mode == kFBModeLoad ? Common::convertToU32String(_("Choose file for loading")) : Common::convertToU32String(_("Enter filename for saving")));
|
||||
|
||||
_fileName = new EditTextWidget(this, "FileBrowser.Filename", "");
|
||||
|
||||
@ -62,8 +62,8 @@ FileBrowserDialog::FileBrowserDialog(const char *title, const char *fileExtensio
|
||||
_backgroundType = GUI::ThemeEngine::kDialogBackgroundPlain;
|
||||
|
||||
// Buttons
|
||||
new ButtonWidget(this, "FileBrowser.Cancel", _("Cancel"), nullptr, kCloseCmd);
|
||||
new ButtonWidget(this, "FileBrowser.Choose", _("Choose"), nullptr, kChooseCmd);
|
||||
new ButtonWidget(this, "FileBrowser.Cancel", Common::convertToU32String(_("Cancel")), nullptr, kCloseCmd);
|
||||
new ButtonWidget(this, "FileBrowser.Choose", Common::convertToU32String(_("Choose")), nullptr, kChooseCmd);
|
||||
}
|
||||
|
||||
void FileBrowserDialog::open() {
|
||||
|
@ -129,22 +129,22 @@ void LauncherDialog::build() {
|
||||
_logo->useThemeTransparency(true);
|
||||
_logo->setGfx(g_gui.theme()->getImageSurface(ThemeEngine::kImageLogo));
|
||||
|
||||
new StaticTextWidget(this, "Launcher.Version", gScummVMVersionDate);
|
||||
new StaticTextWidget(this, "Launcher.Version", Common::convertToU32String(gScummVMVersionDate));
|
||||
} else
|
||||
new StaticTextWidget(this, "Launcher.Version", gScummVMFullVersion);
|
||||
new StaticTextWidget(this, "Launcher.Version", Common::convertToU32String(gScummVMFullVersion));
|
||||
#else
|
||||
// Show ScummVM version
|
||||
new StaticTextWidget(this, "Launcher.Version", gScummVMFullVersion);
|
||||
#endif
|
||||
if (!g_system->hasFeature(OSystem::kFeatureNoQuit))
|
||||
new ButtonWidget(this, "Launcher.QuitButton", _("~Q~uit"), _("Quit ScummVM"), kQuitCmd);
|
||||
new ButtonWidget(this, "Launcher.AboutButton", _("A~b~out..."), _("About ScummVM"), kAboutCmd);
|
||||
new ButtonWidget(this, "Launcher.OptionsButton", _("~O~ptions..."), _("Change global ScummVM options"), kOptionsCmd);
|
||||
new ButtonWidget(this, "Launcher.QuitButton", Common::convertToU32String(_("~Q~uit")), _("Quit ScummVM"), kQuitCmd);
|
||||
new ButtonWidget(this, "Launcher.AboutButton", Common::convertToU32String(_("A~b~out...")), _("About ScummVM"), kAboutCmd);
|
||||
new ButtonWidget(this, "Launcher.OptionsButton", Common::convertToU32String(_("~O~ptions...")), _("Change global ScummVM options"), kOptionsCmd);
|
||||
_startButton =
|
||||
new ButtonWidget(this, "Launcher.StartButton", _("~S~tart"), _("Start selected game"), kStartCmd);
|
||||
new ButtonWidget(this, "Launcher.StartButton", Common::convertToU32String(_("~S~tart")), _("Start selected game"), kStartCmd);
|
||||
|
||||
DropdownButtonWidget *loadButton =
|
||||
new DropdownButtonWidget(this, "Launcher.LoadGameButton", _("~L~oad..."), _("Load saved game for selected game"), kLoadGameCmd);
|
||||
new DropdownButtonWidget(this, "Launcher.LoadGameButton", Common::convertToU32String(_("~L~oad...")), _("Load saved game for selected game"), kLoadGameCmd);
|
||||
#ifdef ENABLE_EVENTRECORDER
|
||||
loadButton->appendEntry(_("Record..."), kRecordGameCmd);
|
||||
#endif
|
||||
@ -153,24 +153,24 @@ void LauncherDialog::build() {
|
||||
// Above the lowest button rows: two more buttons (directly below the list box)
|
||||
if (g_system->getOverlayWidth() > 320) {
|
||||
DropdownButtonWidget *addButton =
|
||||
new DropdownButtonWidget(this, "Launcher.AddGameButton", _("~A~dd Game..."), _("Add games to the list"), kAddGameCmd);
|
||||
addButton->appendEntry(_("Mass Add..."), kMassAddGameCmd);
|
||||
new DropdownButtonWidget(this, "Launcher.AddGameButton", Common::convertToU32String(_("~A~dd Game...")), _("Add games to the list"), kAddGameCmd);
|
||||
addButton->appendEntry(Common::convertToU32String(_("Mass Add...")), kMassAddGameCmd);
|
||||
_addButton = addButton;
|
||||
|
||||
_editButton =
|
||||
new ButtonWidget(this, "Launcher.EditGameButton", _("~E~dit Game..."), _("Change game options"), kEditGameCmd);
|
||||
new ButtonWidget(this, "Launcher.EditGameButton", Common::convertToU32String(_("~E~dit Game...")), _("Change game options"), kEditGameCmd);
|
||||
_removeButton =
|
||||
new ButtonWidget(this, "Launcher.RemoveGameButton", _("~R~emove Game"), _("Remove game from the list. The game data files stay intact"), kRemoveGameCmd);
|
||||
new ButtonWidget(this, "Launcher.RemoveGameButton", Common::convertToU32String(_("~R~emove Game")), _("Remove game from the list. The game data files stay intact"), kRemoveGameCmd);
|
||||
} else {
|
||||
DropdownButtonWidget *addButton =
|
||||
new DropdownButtonWidget(this, "Launcher.AddGameButton", _c("~A~dd Game...", "lowres"), _("Add games to the list"), kAddGameCmd);
|
||||
addButton->appendEntry(_c("Mass Add...", "lowres"), kMassAddGameCmd);
|
||||
new DropdownButtonWidget(this, "Launcher.AddGameButton", Common::convertToU32String(_c("~A~dd Game...", "lowres")), _("Add games to the list"), kAddGameCmd);
|
||||
addButton->appendEntry(Common::convertToU32String(_c("Mass Add...", "lowres")), kMassAddGameCmd);
|
||||
_addButton = addButton;
|
||||
|
||||
_editButton =
|
||||
new ButtonWidget(this, "Launcher.EditGameButton", _c("~E~dit Game...", "lowres"), _("Change game options"), kEditGameCmd);
|
||||
new ButtonWidget(this, "Launcher.EditGameButton", Common::convertToU32String(_c("~E~dit Game...", "lowres")), _("Change game options"), kEditGameCmd);
|
||||
_removeButton =
|
||||
new ButtonWidget(this, "Launcher.RemoveGameButton", _c("~R~emove Game", "lowres"), _("Remove game from the list. The game data files stay intact"), kRemoveGameCmd);
|
||||
new ButtonWidget(this, "Launcher.RemoveGameButton", Common::convertToU32String(_c("~R~emove Game", "lowres")), _("Remove game from the list. The game data files stay intact"), kRemoveGameCmd);
|
||||
}
|
||||
|
||||
// Search box
|
||||
@ -182,7 +182,7 @@ void LauncherDialog::build() {
|
||||
_searchPic->setGfx(g_gui.theme()->getImageSurface(ThemeEngine::kImageSearch));
|
||||
} else
|
||||
#endif
|
||||
_searchDesc = new StaticTextWidget(this, "Launcher.SearchDesc", _("Search:"));
|
||||
_searchDesc = new StaticTextWidget(this, "Launcher.SearchDesc", Common::convertToU32String(_("Search:")));
|
||||
|
||||
_searchWidget = new EditTextWidget(this, "Launcher.Search", _search, nullptr, kSearchCmd);
|
||||
_searchClearButton = addClearButton(this, "Launcher.SearchClearButton", kSearchClearCmd);
|
||||
@ -718,7 +718,7 @@ void LauncherDialog::reflowLayout() {
|
||||
StaticTextWidget *ver = (StaticTextWidget *)findWidget("Launcher.Version");
|
||||
if (ver) {
|
||||
ver->setAlign(g_gui.xmlEval()->getWidgetTextHAlign("Launcher.Version"));
|
||||
ver->setLabel(gScummVMVersionDate);
|
||||
ver->setLabel(Common::convertToU32String(gScummVMVersionDate));
|
||||
}
|
||||
|
||||
if (!_logo)
|
||||
@ -729,7 +729,7 @@ void LauncherDialog::reflowLayout() {
|
||||
StaticTextWidget *ver = (StaticTextWidget *)findWidget("Launcher.Version");
|
||||
if (ver) {
|
||||
ver->setAlign(g_gui.xmlEval()->getWidgetTextHAlign("Launcher.Version"));
|
||||
ver->setLabel(gScummVMFullVersion);
|
||||
ver->setLabel(Common::convertToU32String(gScummVMFullVersion));
|
||||
}
|
||||
|
||||
if (_logo) {
|
||||
@ -753,7 +753,7 @@ void LauncherDialog::reflowLayout() {
|
||||
}
|
||||
} else {
|
||||
if (!_searchDesc)
|
||||
_searchDesc = new StaticTextWidget(this, "Launcher.SearchDesc", _("Search:"));
|
||||
_searchDesc = new StaticTextWidget(this, "Launcher.SearchDesc", Common::convertToU32String(_("Search:")));
|
||||
|
||||
if (_searchPic) {
|
||||
removeWidget(_searchPic);
|
||||
|
@ -73,10 +73,10 @@ MassAddDialog::MassAddDialog(const Common::FSNode &startDir)
|
||||
// new StaticTextWidget(this, "massadddialog_caption", "Mass Add Dialog");
|
||||
|
||||
_dirProgressText = new StaticTextWidget(this, "MassAdd.DirProgressText",
|
||||
_("... progress ..."));
|
||||
Common::convertToU32String(_("... progress ...")));
|
||||
|
||||
_gameProgressText = new StaticTextWidget(this, "MassAdd.GameProgressText",
|
||||
_("... progress ..."));
|
||||
Common::convertToU32String(_("... progress ...")));
|
||||
|
||||
_dirProgressText->setAlign(Graphics::kTextAlignCenter);
|
||||
_gameProgressText->setAlign(Graphics::kTextAlignCenter);
|
||||
@ -86,10 +86,10 @@ MassAddDialog::MassAddDialog(const Common::FSNode &startDir)
|
||||
_list->setNumberingMode(kListNumberingOff);
|
||||
_list->setList(l);
|
||||
|
||||
_okButton = new ButtonWidget(this, "MassAdd.Ok", _("OK"), nullptr, kOkCmd, Common::ASCII_RETURN);
|
||||
_okButton = new ButtonWidget(this, "MassAdd.Ok", Common::convertToU32String("Ok"), nullptr, kOkCmd, Common::ASCII_RETURN);
|
||||
_okButton->setEnabled(false);
|
||||
|
||||
new ButtonWidget(this, "MassAdd.Cancel", _("Cancel"), nullptr, kCancelCmd, Common::ASCII_ESCAPE);
|
||||
new ButtonWidget(this, "MassAdd.Cancel", Common::convertToU32String("Cancel"), nullptr, kCancelCmd, Common::ASCII_ESCAPE);
|
||||
|
||||
// Build a map from all configured game paths to the targets using them
|
||||
const Common::ConfigManager::DomainMap &domains = ConfMan.getGameDomains();
|
||||
|
@ -94,10 +94,10 @@ MessageDialog::MessageDialog(const Common::String &message, const char *defaultB
|
||||
}
|
||||
|
||||
if (defaultButton)
|
||||
new ButtonWidget(this, okButtonPos, _h - buttonHeight - 8, buttonWidth, buttonHeight, defaultButton, nullptr, kOkCmd, Common::ASCII_RETURN); // Confirm dialog
|
||||
new ButtonWidget(this, okButtonPos, _h - buttonHeight - 8, buttonWidth, buttonHeight, Common::convertToU32String(defaultButton), nullptr, kOkCmd, Common::ASCII_RETURN); // Confirm dialog
|
||||
|
||||
if (altButton)
|
||||
new ButtonWidget(this, cancelButtonPos, _h - buttonHeight - 8, buttonWidth, buttonHeight, altButton, nullptr, kCancelCmd, Common::ASCII_ESCAPE); // Cancel dialog
|
||||
new ButtonWidget(this, cancelButtonPos, _h - buttonHeight - 8, buttonWidth, buttonHeight, Common::convertToU32String(altButton), nullptr, kCancelCmd, Common::ASCII_ESCAPE); // Cancel dialog
|
||||
}
|
||||
|
||||
void MessageDialog::handleCommand(CommandSender *sender, uint32 cmd, uint32 data) {
|
||||
|
354
gui/options.cpp
354
gui/options.cpp
@ -261,7 +261,7 @@ void OptionsDialog::build() {
|
||||
int value = ConfMan.getInt("kbdmouse_speed", _domain);
|
||||
if (_kbdMouseSpeedSlider && value < ARRAYSIZE(kbdMouseSpeedLabels) - 1 && value >= 0) {
|
||||
_kbdMouseSpeedSlider->setValue(value);
|
||||
_kbdMouseSpeedLabel->setLabel(_(kbdMouseSpeedLabels[value]));
|
||||
_kbdMouseSpeedLabel->setLabel(Common::convertToU32String(_(kbdMouseSpeedLabels[value])));
|
||||
}
|
||||
}
|
||||
if (g_system->hasFeature(OSystem::kFeatureJoystickDeadzone)) {
|
||||
@ -392,7 +392,7 @@ void OptionsDialog::build() {
|
||||
|
||||
Common::String soundFont(ConfMan.get("soundfont", _domain));
|
||||
if (soundFont.empty() || !ConfMan.hasKey("soundfont", _domain)) {
|
||||
_soundFont->setLabel(_c("None", "soundfont"));
|
||||
_soundFont->setLabel(Common::convertToU32String(_c("None", "soundfont")));
|
||||
_soundFontClearButton->setEnabled(false);
|
||||
} else {
|
||||
_soundFont->setLabel(soundFont);
|
||||
@ -744,7 +744,7 @@ void OptionsDialog::apply() {
|
||||
ConfMan.setBool("multi_midi", _multiMidiCheckbox->getState(), _domain);
|
||||
ConfMan.setInt("midi_gain", _midiGainSlider->getValue(), _domain);
|
||||
|
||||
Common::String soundFont(_soundFont->getLabel());
|
||||
Common::String soundFont(Common::convertFromU32String(_soundFont->getLabel()));
|
||||
if (!soundFont.empty() && (soundFont != _c("None", "soundfont")))
|
||||
ConfMan.set("soundfont", soundFont, _domain);
|
||||
else
|
||||
@ -883,12 +883,12 @@ void OptionsDialog::handleCommand(CommandSender *sender, uint32 cmd, uint32 data
|
||||
_subSpeedLabel->markAsDirty();
|
||||
break;
|
||||
case kClearSoundFontCmd:
|
||||
_soundFont->setLabel(_c("None", "soundfont"));
|
||||
_soundFont->setLabel(Common::convertToU32String(_c("None", "soundfont")));
|
||||
_soundFontClearButton->setEnabled(false);
|
||||
g_gui.scheduleTopDialogRedraw();
|
||||
break;
|
||||
case kKbdMouseSpeedChanged:
|
||||
_kbdMouseSpeedLabel->setLabel(_(kbdMouseSpeedLabels[_kbdMouseSpeedSlider->getValue()]));
|
||||
_kbdMouseSpeedLabel->setLabel(Common::convertToU32String(_(kbdMouseSpeedLabels[_kbdMouseSpeedSlider->getValue()])));
|
||||
_kbdMouseSpeedLabel->markAsDirty();
|
||||
break;
|
||||
case kJoystickDeadzoneChanged:
|
||||
@ -1068,24 +1068,24 @@ void OptionsDialog::setSubtitleSettingsState(bool enabled) {
|
||||
void OptionsDialog::addControlControls(GuiObject *boss, const Common::String &prefix) {
|
||||
// Show On-Screen control
|
||||
if (g_system->hasFeature(OSystem::kFeatureOnScreenControl))
|
||||
_onscreenCheckbox = new CheckboxWidget(boss, prefix + "grOnScreenCheckbox", _("Show On-screen control"));
|
||||
_onscreenCheckbox = new CheckboxWidget(boss, prefix + "grOnScreenCheckbox", Common::convertToU32String(_("Show On-screen control")));
|
||||
|
||||
// Touchpad Mouse mode
|
||||
if (g_system->hasFeature(OSystem::kFeatureTouchpadMode))
|
||||
_touchpadCheckbox = new CheckboxWidget(boss, prefix + "grTouchpadCheckbox", _("Touchpad mouse mode"));
|
||||
_touchpadCheckbox = new CheckboxWidget(boss, prefix + "grTouchpadCheckbox", Common::convertToU32String(_("Touchpad mouse mode")));
|
||||
|
||||
// Swap menu and back buttons
|
||||
if (g_system->hasFeature(OSystem::kFeatureSwapMenuAndBackButtons))
|
||||
_swapMenuAndBackBtnsCheckbox = new CheckboxWidget(boss, prefix + "grSwapMenuAndBackBtnsCheckbox", _("Swap Menu and Back buttons"));
|
||||
_swapMenuAndBackBtnsCheckbox = new CheckboxWidget(boss, prefix + "grSwapMenuAndBackBtnsCheckbox", Common::convertToU32String(_("Swap Menu and Back buttons")));
|
||||
|
||||
// Keyboard and joystick mouse speed
|
||||
if (g_system->hasFeature(OSystem::kFeatureKbdMouseSpeed)) {
|
||||
if (g_system->getOverlayWidth() > 320)
|
||||
_kbdMouseSpeedDesc = new StaticTextWidget(boss, prefix + "grKbdMouseSpeedDesc", _("Pointer Speed:"), _("Speed for keyboard/joystick mouse pointer control"));
|
||||
_kbdMouseSpeedDesc = new StaticTextWidget(boss, prefix + "grKbdMouseSpeedDesc", Common::convertToU32String(_("Pointer Speed:")), _("Speed for keyboard/joystick mouse pointer control"));
|
||||
else
|
||||
_kbdMouseSpeedDesc = new StaticTextWidget(boss, prefix + "grKbdMouseSpeedDesc", _c("Pointer Speed:", "lowres"), _("Speed for keyboard/joystick mouse pointer control"));
|
||||
_kbdMouseSpeedDesc = new StaticTextWidget(boss, prefix + "grKbdMouseSpeedDesc", Common::convertToU32String(_c("Pointer Speed:", "lowres")), _("Speed for keyboard/joystick mouse pointer control"));
|
||||
_kbdMouseSpeedSlider = new SliderWidget(boss, prefix + "grKbdMouseSpeedSlider", _("Speed for keyboard/joystick mouse pointer control"), kKbdMouseSpeedChanged);
|
||||
_kbdMouseSpeedLabel = new StaticTextWidget(boss, prefix + "grKbdMouseSpeedLabel", " ");
|
||||
_kbdMouseSpeedLabel = new StaticTextWidget(boss, prefix + "grKbdMouseSpeedLabel", Common::convertToU32String(" "));
|
||||
_kbdMouseSpeedSlider->setMinValue(0);
|
||||
_kbdMouseSpeedSlider->setMaxValue(7);
|
||||
_kbdMouseSpeedLabel->setFlags(WIDGET_CLEARBG);
|
||||
@ -1094,11 +1094,11 @@ void OptionsDialog::addControlControls(GuiObject *boss, const Common::String &pr
|
||||
// Joystick deadzone
|
||||
if (g_system->hasFeature(OSystem::kFeatureJoystickDeadzone)) {
|
||||
if (g_system->getOverlayWidth() > 320)
|
||||
_joystickDeadzoneDesc = new StaticTextWidget(boss, prefix + "grJoystickDeadzoneDesc", _("Joy Deadzone:"), _("Analog joystick Deadzone"));
|
||||
_joystickDeadzoneDesc = new StaticTextWidget(boss, prefix + "grJoystickDeadzoneDesc", Common::convertToU32String(_("Joy Deadzone:")), _("Analog joystick Deadzone"));
|
||||
else
|
||||
_joystickDeadzoneDesc = new StaticTextWidget(boss, prefix + "grJoystickDeadzoneDesc", _c("Joy Deadzone:", "lowres"), _("Analog joystick Deadzone"));
|
||||
_joystickDeadzoneDesc = new StaticTextWidget(boss, prefix + "grJoystickDeadzoneDesc", Common::convertToU32String(_c("Joy Deadzone:", "lowres")), _("Analog joystick Deadzone"));
|
||||
_joystickDeadzoneSlider = new SliderWidget(boss, prefix + "grJoystickDeadzoneSlider", _("Analog joystick Deadzone"), kJoystickDeadzoneChanged);
|
||||
_joystickDeadzoneLabel = new StaticTextWidget(boss, prefix + "grJoystickDeadzoneLabel", " ");
|
||||
_joystickDeadzoneLabel = new StaticTextWidget(boss, prefix + "grJoystickDeadzoneLabel", Common::convertToU32String(" "));
|
||||
_joystickDeadzoneSlider->setMinValue(1);
|
||||
_joystickDeadzoneSlider->setMaxValue(10);
|
||||
_joystickDeadzoneLabel->setFlags(WIDGET_CLEARBG);
|
||||
@ -1155,13 +1155,13 @@ void OptionsDialog::addAchievementsControls(GuiObject *boss, const Common::Strin
|
||||
}
|
||||
|
||||
CheckboxWidget *checkBox;
|
||||
checkBox = new CheckboxWidget(scrollContainer, lineHeight, yPos, width, yStep, info.descriptions[idx].title);
|
||||
checkBox = new CheckboxWidget(scrollContainer, lineHeight, yPos, width, yStep, Common::convertToU32String(info.descriptions[idx].title));
|
||||
checkBox->setEnabled(false);
|
||||
checkBox->setState(isAchieved);
|
||||
yPos += yStep;
|
||||
|
||||
if (info.descriptions[idx].comment && strlen(info.descriptions[idx].comment) > 0) {
|
||||
new StaticTextWidget(scrollContainer, lineHeight + descrDelta, yPos, width - descrDelta, yStep, info.descriptions[idx].comment, Graphics::kTextAlignStart, "", ThemeEngine::kFontStyleNormal);
|
||||
new StaticTextWidget(scrollContainer, lineHeight + descrDelta, yPos, width - descrDelta, yStep, Common::convertToU32String(info.descriptions[idx].comment), Graphics::kTextAlignStart, "", ThemeEngine::kFontStyleNormal);
|
||||
yPos += yStep;
|
||||
}
|
||||
|
||||
@ -1171,12 +1171,12 @@ void OptionsDialog::addAchievementsControls(GuiObject *boss, const Common::Strin
|
||||
|
||||
if (nHidden) {
|
||||
Common::String hiddenStr = Common::String::format(_("%d hidden achievements remaining"), nHidden);
|
||||
new StaticTextWidget(scrollContainer, lineHeight, yPos, width, yStep, hiddenStr.c_str(), Graphics::kTextAlignStart);
|
||||
new StaticTextWidget(scrollContainer, lineHeight, yPos, width, yStep, Common::convertToU32String(hiddenStr.c_str()), Graphics::kTextAlignStart);
|
||||
}
|
||||
|
||||
if (nMax) {
|
||||
Common::String totalStr = Common::String::format(_("Achievements unlocked: %d/%d"), nAchieved, nMax);
|
||||
new StaticTextWidget(scrollContainer, lineHeight, lineHeight, width, yStep, totalStr.c_str(), Graphics::kTextAlignStart);
|
||||
new StaticTextWidget(scrollContainer, lineHeight, lineHeight, width, yStep, Common::convertToU32String(totalStr.c_str()), Graphics::kTextAlignStart);
|
||||
|
||||
SliderWidget *progressBar;
|
||||
progressBar = new SliderWidget(scrollContainer, lineHeight, lineHeight*2, progressBarWidth, lineHeight);
|
||||
@ -1194,14 +1194,14 @@ void OptionsDialog::addShaderControls(GuiObject *boss, const Common::String &pre
|
||||
|
||||
// Shader selector
|
||||
if (g_system->getOverlayWidth() > 320)
|
||||
_shaderPopUpDesc = new StaticTextWidget(boss, prefix + "grShaderPopUpDesc", _("HW Shader:"), _("Different hardware shaders give different visual effects"));
|
||||
_shaderPopUpDesc = new StaticTextWidget(boss, prefix + "grShaderPopUpDesc", Common::convertToU32String(_("HW Shader:")), _("Different hardware shaders give different visual effects"));
|
||||
else
|
||||
_shaderPopUpDesc = new StaticTextWidget(boss, prefix + "grShaderPopUpDesc", _c("HW Shader:", "lowres"), _("Different hardware shaders give different visual effects"));
|
||||
_shaderPopUpDesc = new StaticTextWidget(boss, prefix + "grShaderPopUpDesc", Common::convertToU32String(_c("HW Shader:", "lowres")), _("Different hardware shaders give different visual effects"));
|
||||
_shaderPopUp = new PopUpWidget(boss, prefix + "grShaderPopUp", _("Different shaders give different visual effects"));
|
||||
const OSystem::GraphicsMode *p = g_system->getSupportedShaders();
|
||||
|
||||
_shaderPopUp->appendEntry(_("<default>"));
|
||||
_shaderPopUp->appendEntry("");
|
||||
_shaderPopUp->appendEntry(Common::convertToU32String(_("<default>")));
|
||||
_shaderPopUp->appendEntry(Common::convertToU32String(""));
|
||||
while (p->name) {
|
||||
_shaderPopUp->appendEntry(_c(p->description, context), p->id);
|
||||
p++;
|
||||
@ -1217,11 +1217,11 @@ void OptionsDialog::addGraphicControls(GuiObject *boss, const Common::String &pr
|
||||
context = "lowres";
|
||||
|
||||
// The GFX mode popup
|
||||
_gfxPopUpDesc = new StaticTextWidget(boss, prefix + "grModePopupDesc", _("Graphics mode:"));
|
||||
_gfxPopUpDesc = new StaticTextWidget(boss, prefix + "grModePopupDesc", Common::convertToU32String(_("Graphics mode:")));
|
||||
_gfxPopUp = new PopUpWidget(boss, prefix + "grModePopup");
|
||||
|
||||
_gfxPopUp->appendEntry(_("<default>"));
|
||||
_gfxPopUp->appendEntry("");
|
||||
_gfxPopUp->appendEntry(Common::convertToU32String(_("<default>")));
|
||||
_gfxPopUp->appendEntry(Common::convertToU32String(""));
|
||||
while (gm->name) {
|
||||
_gfxPopUp->appendEntry(_c(gm->description, context), gm->id);
|
||||
gm++;
|
||||
@ -1231,10 +1231,10 @@ void OptionsDialog::addGraphicControls(GuiObject *boss, const Common::String &pr
|
||||
const Common::String allFlags = Common::allRenderModesGUIOs();
|
||||
bool renderingTypeDefined = (strpbrk(_guioptions.c_str(), allFlags.c_str()) != nullptr);
|
||||
|
||||
_renderModePopUpDesc = new StaticTextWidget(boss, prefix + "grRenderPopupDesc", _("Render mode:"), _("Special dithering modes supported by some games"));
|
||||
_renderModePopUpDesc = new StaticTextWidget(boss, prefix + "grRenderPopupDesc", Common::convertToU32String(_("Render mode:")), _("Special dithering modes supported by some games"));
|
||||
_renderModePopUp = new PopUpWidget(boss, prefix + "grRenderPopup", _("Special dithering modes supported by some games"));
|
||||
_renderModePopUp->appendEntry(_("<default>"), Common::kRenderDefault);
|
||||
_renderModePopUp->appendEntry("");
|
||||
_renderModePopUp->appendEntry(Common::convertToU32String(_("<default>")), Common::kRenderDefault);
|
||||
_renderModePopUp->appendEntry(Common::convertToU32String(""));
|
||||
const Common::RenderModeDescription *rm = Common::g_renderModes;
|
||||
for (; rm->code; ++rm) {
|
||||
Common::String renderGuiOption = Common::renderMode2GUIO(rm->id);
|
||||
@ -1244,24 +1244,24 @@ void OptionsDialog::addGraphicControls(GuiObject *boss, const Common::String &pr
|
||||
|
||||
// The Stretch mode popup
|
||||
const OSystem::GraphicsMode *sm = g_system->getSupportedStretchModes();
|
||||
_stretchPopUpDesc = new StaticTextWidget(boss, prefix + "grStretchModePopupDesc", _("Stretch mode:"));
|
||||
_stretchPopUpDesc = new StaticTextWidget(boss, prefix + "grStretchModePopupDesc", Common::convertToU32String(_("Stretch mode:")));
|
||||
_stretchPopUp = new PopUpWidget(boss, prefix + "grStretchModePopup");
|
||||
|
||||
_stretchPopUp->appendEntry(_("<default>"));
|
||||
_stretchPopUp->appendEntry("");
|
||||
_stretchPopUp->appendEntry(Common::convertToU32String(_("<default>")));
|
||||
_stretchPopUp->appendEntry(Common::convertToU32String(""));
|
||||
while (sm->name) {
|
||||
_stretchPopUp->appendEntry(_c(sm->description, context), sm->id);
|
||||
sm++;
|
||||
}
|
||||
|
||||
// Fullscreen checkbox
|
||||
_fullscreenCheckbox = new CheckboxWidget(boss, prefix + "grFullscreenCheckbox", _("Fullscreen mode"));
|
||||
_fullscreenCheckbox = new CheckboxWidget(boss, prefix + "grFullscreenCheckbox", Common::convertToU32String(_("Fullscreen mode")));
|
||||
|
||||
// Filtering checkbox
|
||||
_filteringCheckbox = new CheckboxWidget(boss, prefix + "grFilteringCheckbox", _("Filter graphics"), _("Use linear filtering when scaling graphics"));
|
||||
_filteringCheckbox = new CheckboxWidget(boss, prefix + "grFilteringCheckbox", Common::convertToU32String(_("Filter graphics")), _("Use linear filtering when scaling graphics"));
|
||||
|
||||
// Aspect ratio checkbox
|
||||
_aspectCheckbox = new CheckboxWidget(boss, prefix + "grAspectCheckbox", _("Aspect ratio correction"), _("Correct aspect ratio for 320x200 games"));
|
||||
_aspectCheckbox = new CheckboxWidget(boss, prefix + "grAspectCheckbox", Common::convertToU32String(_("Aspect ratio correction")), _("Correct aspect ratio for 320x200 games"));
|
||||
|
||||
_enableGraphicSettings = true;
|
||||
}
|
||||
@ -1269,9 +1269,9 @@ void OptionsDialog::addGraphicControls(GuiObject *boss, const Common::String &pr
|
||||
void OptionsDialog::addAudioControls(GuiObject *boss, const Common::String &prefix) {
|
||||
// The MIDI mode popup & a label
|
||||
if (g_system->getOverlayWidth() > 320)
|
||||
_midiPopUpDesc = new StaticTextWidget(boss, prefix + "auMidiPopupDesc", _domain == Common::ConfigManager::kApplicationDomain ? _("Preferred device:") : _("Music device:"), _domain == Common::ConfigManager::kApplicationDomain ? _("Specifies preferred sound device or sound card emulator") : _("Specifies output sound device or sound card emulator"));
|
||||
_midiPopUpDesc = new StaticTextWidget(boss, prefix + "auMidiPopupDesc", _domain == Common::ConfigManager::kApplicationDomain ? Common::convertToU32String(_("Preferred device:")) : Common::convertToU32String(_("Music device:")), _domain == Common::ConfigManager::kApplicationDomain ? _("Specifies preferred sound device or sound card emulator") : _("Specifies output sound device or sound card emulator"));
|
||||
else
|
||||
_midiPopUpDesc = new StaticTextWidget(boss, prefix + "auMidiPopupDesc", _domain == Common::ConfigManager::kApplicationDomain ? _c("Preferred dev.:", "lowres") : _c("Music device:", "lowres"), _domain == Common::ConfigManager::kApplicationDomain ? _("Specifies preferred sound device or sound card emulator") : _("Specifies output sound device or sound card emulator"));
|
||||
_midiPopUpDesc = new StaticTextWidget(boss, prefix + "auMidiPopupDesc", _domain == Common::ConfigManager::kApplicationDomain ? Common::convertToU32String(_c("Preferred dev.:", "lowres")) : Common::convertToU32String(_c("Music device:", "lowres")), _domain == Common::ConfigManager::kApplicationDomain ? _("Specifies preferred sound device or sound card emulator") : _("Specifies output sound device or sound card emulator"));
|
||||
_midiPopUp = new PopUpWidget(boss, prefix + "auMidiPopup", _("Specifies output sound device or sound card emulator"));
|
||||
|
||||
// Populate it
|
||||
@ -1298,13 +1298,13 @@ void OptionsDialog::addAudioControls(GuiObject *boss, const Common::String &pref
|
||||
}
|
||||
|
||||
// The OPL emulator popup & a label
|
||||
_oplPopUpDesc = new StaticTextWidget(boss, prefix + "auOPLPopupDesc", _("AdLib emulator:"), _("AdLib is used for music in many games"));
|
||||
_oplPopUpDesc = new StaticTextWidget(boss, prefix + "auOPLPopupDesc", Common::convertToU32String(_("AdLib emulator:")), _("AdLib is used for music in many games"));
|
||||
_oplPopUp = new PopUpWidget(boss, prefix + "auOPLPopup", _("AdLib is used for music in many games"));
|
||||
|
||||
// Populate it
|
||||
const OPL::Config::EmulatorDescription *ed = OPL::Config::getAvailable();
|
||||
while (ed->name) {
|
||||
_oplPopUp->appendEntry(_(ed->description), ed->id);
|
||||
_oplPopUp->appendEntry(Common::convertToU32String(_(ed->description)), ed->id);
|
||||
++ed;
|
||||
}
|
||||
|
||||
@ -1312,7 +1312,7 @@ void OptionsDialog::addAudioControls(GuiObject *boss, const Common::String &pref
|
||||
}
|
||||
|
||||
void OptionsDialog::addMIDIControls(GuiObject *boss, const Common::String &prefix) {
|
||||
_gmDevicePopUpDesc = new StaticTextWidget(boss, prefix + "auPrefGmPopupDesc", _("GM device:"), _("Specifies default sound device for General MIDI output"));
|
||||
_gmDevicePopUpDesc = new StaticTextWidget(boss, prefix + "auPrefGmPopupDesc", Common::convertToU32String(_("GM device:")), _("Specifies default sound device for General MIDI output"));
|
||||
_gmDevicePopUp = new PopUpWidget(boss, prefix + "auPrefGmPopup");
|
||||
|
||||
// Populate
|
||||
@ -1323,7 +1323,7 @@ void OptionsDialog::addMIDIControls(GuiObject *boss, const Common::String &prefi
|
||||
MusicDevices i = (*m)->get<MusicPluginObject>().getDevices();
|
||||
for (MusicDevices::iterator d = i.begin(); d != i.end(); ++d) {
|
||||
if (d->getMusicDriverId() == "null")
|
||||
_gmDevicePopUp->appendEntry(_("Don't use General MIDI music"), d->getHandle());
|
||||
_gmDevicePopUp->appendEntry(Common::convertToU32String(_("Don't use General MIDI music")), d->getHandle());
|
||||
}
|
||||
}
|
||||
// Now we add the other devices.
|
||||
@ -1334,7 +1334,7 @@ void OptionsDialog::addMIDIControls(GuiObject *boss, const Common::String &prefi
|
||||
if (d->getMusicType() != MT_MT32)
|
||||
_gmDevicePopUp->appendEntry(d->getCompleteName(), d->getHandle());
|
||||
} else if (d->getMusicDriverId() == "auto") {
|
||||
_gmDevicePopUp->appendEntry(_("Use first available device"), d->getHandle());
|
||||
_gmDevicePopUp->appendEntry(Common::convertToU32String(_("Use first available device")), d->getHandle());
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -1346,38 +1346,38 @@ void OptionsDialog::addMIDIControls(GuiObject *boss, const Common::String &prefi
|
||||
|
||||
// SoundFont
|
||||
if (g_system->getOverlayWidth() > 320)
|
||||
_soundFontButton = new ButtonWidget(boss, prefix + "mcFontButton", _("SoundFont:"), _("SoundFont is supported by some audio cards, FluidSynth and Timidity"), kChooseSoundFontCmd);
|
||||
_soundFontButton = new ButtonWidget(boss, prefix + "mcFontButton", Common::convertToU32String(_("SoundFont:")), _("SoundFont is supported by some audio cards, FluidSynth and Timidity"), kChooseSoundFontCmd);
|
||||
else
|
||||
_soundFontButton = new ButtonWidget(boss, prefix + "mcFontButton", _c("SoundFont:", "lowres"), _("SoundFont is supported by some audio cards, FluidSynth and Timidity"), kChooseSoundFontCmd);
|
||||
_soundFont = new StaticTextWidget(boss, prefix + "mcFontPath", _c("None", "soundfont"), _("SoundFont is supported by some audio cards, FluidSynth and Timidity"));
|
||||
_soundFontButton = new ButtonWidget(boss, prefix + "mcFontButton", Common::convertToU32String(_c("SoundFont:", "lowres")), _("SoundFont is supported by some audio cards, FluidSynth and Timidity"), kChooseSoundFontCmd);
|
||||
_soundFont = new StaticTextWidget(boss, prefix + "mcFontPath", Common::convertToU32String(_c("None", "soundfont")), _("SoundFont is supported by some audio cards, FluidSynth and Timidity"));
|
||||
|
||||
_soundFontClearButton = addClearButton(boss, prefix + "mcFontClearButton", kClearSoundFontCmd);
|
||||
|
||||
// Multi midi setting
|
||||
_multiMidiCheckbox = new CheckboxWidget(boss, prefix + "mcMixedCheckbox", _("Mixed AdLib/MIDI mode"), _("Use both MIDI and AdLib sound generation"));
|
||||
_multiMidiCheckbox = new CheckboxWidget(boss, prefix + "mcMixedCheckbox", Common::convertToU32String(_("Mixed AdLib/MIDI mode")), _("Use both MIDI and AdLib sound generation"));
|
||||
|
||||
// MIDI gain setting (FluidSynth uses this)
|
||||
_midiGainDesc = new StaticTextWidget(boss, prefix + "mcMidiGainText", _("MIDI gain:"));
|
||||
_midiGainDesc = new StaticTextWidget(boss, prefix + "mcMidiGainText", Common::convertToU32String(_("MIDI gain:")));
|
||||
_midiGainSlider = new SliderWidget(boss, prefix + "mcMidiGainSlider", nullptr, kMidiGainChanged);
|
||||
_midiGainSlider->setMinValue(0);
|
||||
_midiGainSlider->setMaxValue(1000);
|
||||
_midiGainLabel = new StaticTextWidget(boss, prefix + "mcMidiGainLabel", "1.00");
|
||||
_midiGainLabel = new StaticTextWidget(boss, prefix + "mcMidiGainLabel", Common::convertToU32String("1.00"));
|
||||
|
||||
_enableMIDISettings = true;
|
||||
}
|
||||
|
||||
void OptionsDialog::addMT32Controls(GuiObject *boss, const Common::String &prefix) {
|
||||
_mt32DevicePopUpDesc = new StaticTextWidget(boss, prefix + "auPrefMt32PopupDesc", _("MT-32 Device:"), _("Specifies default sound device for Roland MT-32/LAPC1/CM32l/CM64 output"));
|
||||
_mt32DevicePopUpDesc = new StaticTextWidget(boss, prefix + "auPrefMt32PopupDesc", Common::convertToU32String(_("MT-32 Device:")), _("Specifies default sound device for Roland MT-32/LAPC1/CM32l/CM64 output"));
|
||||
_mt32DevicePopUp = new PopUpWidget(boss, prefix + "auPrefMt32Popup");
|
||||
|
||||
// Native mt32 setting
|
||||
if (g_system->getOverlayWidth() > 320)
|
||||
_mt32Checkbox = new CheckboxWidget(boss, prefix + "mcMt32Checkbox", _("True Roland MT-32 (disable GM emulation)"), _("Check if you want to use your real hardware Roland-compatible sound device connected to your computer"));
|
||||
_mt32Checkbox = new CheckboxWidget(boss, prefix + "mcMt32Checkbox", Common::convertToU32String(_("True Roland MT-32 (disable GM emulation)")), _("Check if you want to use your real hardware Roland-compatible sound device connected to your computer"));
|
||||
else
|
||||
_mt32Checkbox = new CheckboxWidget(boss, prefix + "mcMt32Checkbox", _c("True Roland MT-32 (no GM emulation)", "lowres"), _("Check if you want to use your real hardware Roland-compatible sound device connected to your computer"));
|
||||
_mt32Checkbox = new CheckboxWidget(boss, prefix + "mcMt32Checkbox", Common::convertToU32String(_c("True Roland MT-32 (no GM emulation)", "lowres")), _("Check if you want to use your real hardware Roland-compatible sound device connected to your computer"));
|
||||
|
||||
// GS Extensions setting
|
||||
_enableGSCheckbox = new CheckboxWidget(boss, prefix + "mcGSCheckbox", _("Roland GS device (enable MT-32 mappings)"), _("Check if you want to enable patch mappings to emulate an MT-32 on a Roland GS device"));
|
||||
_enableGSCheckbox = new CheckboxWidget(boss, prefix + "mcGSCheckbox", Common::convertToU32String(_("Roland GS device (enable MT-32 mappings)")), _("Check if you want to enable patch mappings to emulate an MT-32 on a Roland GS device"));
|
||||
|
||||
const PluginList p = MusicMan.getPlugins();
|
||||
// Make sure the null device is the first one in the list to avoid undesired
|
||||
@ -1386,7 +1386,7 @@ void OptionsDialog::addMT32Controls(GuiObject *boss, const Common::String &prefi
|
||||
MusicDevices i = (*m)->get<MusicPluginObject>().getDevices();
|
||||
for (MusicDevices::iterator d = i.begin(); d != i.end(); ++d) {
|
||||
if (d->getMusicDriverId() == "null")
|
||||
_mt32DevicePopUp->appendEntry(_("Don't use Roland MT-32 music"), d->getHandle());
|
||||
_mt32DevicePopUp->appendEntry(Common::convertToU32String(_("Don't use Roland MT-32 music")), d->getHandle());
|
||||
}
|
||||
}
|
||||
// Now we add the other devices.
|
||||
@ -1396,7 +1396,7 @@ void OptionsDialog::addMT32Controls(GuiObject *boss, const Common::String &prefi
|
||||
if (d->getMusicType() >= MT_GM)
|
||||
_mt32DevicePopUp->appendEntry(d->getCompleteName(), d->getHandle());
|
||||
else if (d->getMusicDriverId() == "auto")
|
||||
_mt32DevicePopUp->appendEntry(_("Use first available device"), d->getHandle());
|
||||
_mt32DevicePopUp->appendEntry(Common::convertToU32String(_("Use first available device")), d->getHandle());
|
||||
}
|
||||
}
|
||||
|
||||
@ -1413,30 +1413,30 @@ void OptionsDialog::addMT32Controls(GuiObject *boss, const Common::String &prefi
|
||||
void OptionsDialog::addSubtitleControls(GuiObject *boss, const Common::String &prefix, int maxSliderVal) {
|
||||
|
||||
if (g_system->getOverlayWidth() > 320) {
|
||||
_subToggleDesc = new StaticTextWidget(boss, prefix + "subToggleDesc", _("Text and speech:"));
|
||||
_subToggleDesc = new StaticTextWidget(boss, prefix + "subToggleDesc", Common::convertToU32String(_("Text and speech:")));
|
||||
|
||||
_subToggleGroup = new RadiobuttonGroup(boss, kSubtitleToggle);
|
||||
|
||||
_subToggleSpeechOnly = new RadiobuttonWidget(boss, prefix + "subToggleSpeechOnly", _subToggleGroup, kSubtitlesSpeech, _("Speech"));
|
||||
_subToggleSubOnly = new RadiobuttonWidget(boss, prefix + "subToggleSubOnly", _subToggleGroup, kSubtitlesSubs, _("Subtitles"));
|
||||
_subToggleSubBoth = new RadiobuttonWidget(boss, prefix + "subToggleSubBoth", _subToggleGroup, kSubtitlesBoth, _("Both"));
|
||||
_subToggleSpeechOnly = new RadiobuttonWidget(boss, prefix + "subToggleSpeechOnly", _subToggleGroup, kSubtitlesSpeech, Common::convertToU32String(_("Speech")));
|
||||
_subToggleSubOnly = new RadiobuttonWidget(boss, prefix + "subToggleSubOnly", _subToggleGroup, kSubtitlesSubs, Common::convertToU32String(_("Subtitles")));
|
||||
_subToggleSubBoth = new RadiobuttonWidget(boss, prefix + "subToggleSubBoth", _subToggleGroup, kSubtitlesBoth, Common::convertToU32String(_("Both")));
|
||||
|
||||
_subSpeedDesc = new StaticTextWidget(boss, prefix + "subSubtitleSpeedDesc", _("Subtitle speed:"));
|
||||
_subSpeedDesc = new StaticTextWidget(boss, prefix + "subSubtitleSpeedDesc", Common::convertToU32String(_("Subtitle speed:")));
|
||||
} else {
|
||||
_subToggleDesc = new StaticTextWidget(boss, prefix + "subToggleDesc", _c("Text and speech:", "lowres"));
|
||||
_subToggleDesc = new StaticTextWidget(boss, prefix + "subToggleDesc", Common::convertToU32String(_c("Text and speech:", "lowres")));
|
||||
|
||||
_subToggleGroup = new RadiobuttonGroup(boss, kSubtitleToggle);
|
||||
|
||||
_subToggleSpeechOnly = new RadiobuttonWidget(boss, prefix + "subToggleSpeechOnly", _subToggleGroup, kSubtitlesSpeech, _("Spch"), _("Speech"));
|
||||
_subToggleSubOnly = new RadiobuttonWidget(boss, prefix + "subToggleSubOnly", _subToggleGroup, kSubtitlesSubs, _("Subs"), _("Subtitles"));
|
||||
_subToggleSubBoth = new RadiobuttonWidget(boss, prefix + "subToggleSubBoth", _subToggleGroup, kSubtitlesBoth, _c("Both", "lowres"), _("Show subtitles and play speech"));
|
||||
_subToggleSpeechOnly = new RadiobuttonWidget(boss, prefix + "subToggleSpeechOnly", _subToggleGroup, kSubtitlesSpeech, Common::convertToU32String(_("Spch")), _("Speech"));
|
||||
_subToggleSubOnly = new RadiobuttonWidget(boss, prefix + "subToggleSubOnly", _subToggleGroup, kSubtitlesSubs, Common::convertToU32String(_("Subs")), _("Subtitles"));
|
||||
_subToggleSubBoth = new RadiobuttonWidget(boss, prefix + "subToggleSubBoth", _subToggleGroup, kSubtitlesBoth, Common::convertToU32String(_c("Both", "lowres")), _("Show subtitles and play speech"));
|
||||
|
||||
_subSpeedDesc = new StaticTextWidget(boss, prefix + "subSubtitleSpeedDesc", _c("Subtitle speed:", "lowres"));
|
||||
_subSpeedDesc = new StaticTextWidget(boss, prefix + "subSubtitleSpeedDesc", Common::convertToU32String(_c("Subtitle speed:", "lowres")));
|
||||
}
|
||||
|
||||
// Subtitle speed
|
||||
_subSpeedSlider = new SliderWidget(boss, prefix + "subSubtitleSpeedSlider", nullptr, kSubtitleSpeedChanged);
|
||||
_subSpeedLabel = new StaticTextWidget(boss, prefix + "subSubtitleSpeedLabel", "100%");
|
||||
_subSpeedLabel = new StaticTextWidget(boss, prefix + "subSubtitleSpeedLabel", Common::convertToU32String("100%"));
|
||||
_subSpeedSlider->setMinValue(0); _subSpeedSlider->setMaxValue(maxSliderVal);
|
||||
_subSpeedLabel->setFlags(WIDGET_CLEARBG);
|
||||
|
||||
@ -1447,33 +1447,33 @@ void OptionsDialog::addVolumeControls(GuiObject *boss, const Common::String &pre
|
||||
|
||||
// Volume controllers
|
||||
if (g_system->getOverlayWidth() > 320)
|
||||
_musicVolumeDesc = new StaticTextWidget(boss, prefix + "vcMusicText", _("Music volume:"));
|
||||
_musicVolumeDesc = new StaticTextWidget(boss, prefix + "vcMusicText", Common::convertToU32String(_("Music volume:")));
|
||||
else
|
||||
_musicVolumeDesc = new StaticTextWidget(boss, prefix + "vcMusicText", _c("Music volume:", "lowres"));
|
||||
_musicVolumeDesc = new StaticTextWidget(boss, prefix + "vcMusicText", Common::convertToU32String(_c("Music volume:", "lowres")));
|
||||
_musicVolumeSlider = new SliderWidget(boss, prefix + "vcMusicSlider", nullptr, kMusicVolumeChanged);
|
||||
_musicVolumeLabel = new StaticTextWidget(boss, prefix + "vcMusicLabel", "100%");
|
||||
_musicVolumeLabel = new StaticTextWidget(boss, prefix + "vcMusicLabel", Common::convertToU32String("100%"));
|
||||
_musicVolumeSlider->setMinValue(0);
|
||||
_musicVolumeSlider->setMaxValue(Audio::Mixer::kMaxMixerVolume);
|
||||
_musicVolumeLabel->setFlags(WIDGET_CLEARBG);
|
||||
|
||||
_muteCheckbox = new CheckboxWidget(boss, prefix + "vcMuteCheckbox", _("Mute all"), nullptr, kMuteAllChanged);
|
||||
_muteCheckbox = new CheckboxWidget(boss, prefix + "vcMuteCheckbox", Common::convertToU32String(_("Mute all")), nullptr, kMuteAllChanged);
|
||||
|
||||
if (g_system->getOverlayWidth() > 320)
|
||||
_sfxVolumeDesc = new StaticTextWidget(boss, prefix + "vcSfxText", _("SFX volume:"), _("Special sound effects volume"));
|
||||
_sfxVolumeDesc = new StaticTextWidget(boss, prefix + "vcSfxText", Common::convertToU32String(_("SFX volume:")), _("Special sound effects volume"));
|
||||
else
|
||||
_sfxVolumeDesc = new StaticTextWidget(boss, prefix + "vcSfxText", _c("SFX volume:", "lowres"), _("Special sound effects volume"));
|
||||
_sfxVolumeDesc = new StaticTextWidget(boss, prefix + "vcSfxText", Common::convertToU32String(_c("SFX volume:", "lowres")), _("Special sound effects volume"));
|
||||
_sfxVolumeSlider = new SliderWidget(boss, prefix + "vcSfxSlider", _("Special sound effects volume"), kSfxVolumeChanged);
|
||||
_sfxVolumeLabel = new StaticTextWidget(boss, prefix + "vcSfxLabel", "100%");
|
||||
_sfxVolumeLabel = new StaticTextWidget(boss, prefix + "vcSfxLabel", Common::convertToU32String("100%"));
|
||||
_sfxVolumeSlider->setMinValue(0);
|
||||
_sfxVolumeSlider->setMaxValue(Audio::Mixer::kMaxMixerVolume);
|
||||
_sfxVolumeLabel->setFlags(WIDGET_CLEARBG);
|
||||
|
||||
if (g_system->getOverlayWidth() > 320)
|
||||
_speechVolumeDesc = new StaticTextWidget(boss, prefix + "vcSpeechText" , _("Speech volume:"));
|
||||
_speechVolumeDesc = new StaticTextWidget(boss, prefix + "vcSpeechText" , Common::convertToU32String(_("Speech volume:")));
|
||||
else
|
||||
_speechVolumeDesc = new StaticTextWidget(boss, prefix + "vcSpeechText" , _c("Speech volume:", "lowres"));
|
||||
_speechVolumeDesc = new StaticTextWidget(boss, prefix + "vcSpeechText" , Common::convertToU32String(_c("Speech volume:", "lowres")));
|
||||
_speechVolumeSlider = new SliderWidget(boss, prefix + "vcSpeechSlider", nullptr, kSpeechVolumeChanged);
|
||||
_speechVolumeLabel = new StaticTextWidget(boss, prefix + "vcSpeechLabel", "100%");
|
||||
_speechVolumeLabel = new StaticTextWidget(boss, prefix + "vcSpeechLabel", Common::convertToU32String("100%"));
|
||||
_speechVolumeSlider->setMinValue(0);
|
||||
_speechVolumeSlider->setMaxValue(Audio::Mixer::kMaxMixerVolume);
|
||||
_speechVolumeLabel->setFlags(WIDGET_CLEARBG);
|
||||
@ -1564,7 +1564,7 @@ void OptionsDialog::updateSpeechVolume(const int newValue) const {
|
||||
|
||||
void OptionsDialog::reflowLayout() {
|
||||
if (_graphicsTabId != -1 && _tabWidget)
|
||||
_tabWidget->setTabTitle(_graphicsTabId, g_system->getOverlayWidth() > 320 ? _("Graphics") : _("GFX"));
|
||||
_tabWidget->setTabTitle(_graphicsTabId, g_system->getOverlayWidth() > 320 ? Common::convertToU32String(_("Graphics")) : Common::convertToU32String(_("GFX")));
|
||||
|
||||
Dialog::reflowLayout();
|
||||
setupGraphicsTab();
|
||||
@ -1695,7 +1695,7 @@ void GlobalOptionsDialog::build() {
|
||||
//
|
||||
// 1) The graphics tab
|
||||
//
|
||||
_graphicsTabId = tab->addTab(g_system->getOverlayWidth() > 320 ? _("Graphics") : _("GFX"), "GlobalOptions_Graphics");
|
||||
_graphicsTabId = tab->addTab(g_system->getOverlayWidth() > 320 ? Common::convertToU32String(_("Graphics")) : Common::convertToU32String(_("GFX")), "GlobalOptions_Graphics");
|
||||
ScrollContainerWidget *graphicsContainer = new ScrollContainerWidget(tab, "GlobalOptions_Graphics.Container", "GlobalOptions_Graphics_Container", kGraphicsTabContainerReflowCmd);
|
||||
graphicsContainer->setTarget(this);
|
||||
graphicsContainer->setBackgroundType(ThemeEngine::kWidgetBackgroundNo);
|
||||
@ -1706,7 +1706,7 @@ void GlobalOptionsDialog::build() {
|
||||
//
|
||||
|
||||
if (g_system->hasFeature(OSystem::kFeatureShader)) {
|
||||
tab->addTab(_("Shader"), "GlobalOptions_Shader");
|
||||
tab->addTab(Common::convertToU32String(_("Shader")), "GlobalOptions_Shader");
|
||||
addShaderControls(tab, "GlobalOptions_Shader.");
|
||||
}
|
||||
|
||||
@ -1718,7 +1718,7 @@ void GlobalOptionsDialog::build() {
|
||||
g_system->hasFeature(OSystem::kFeatureSwapMenuAndBackButtons) ||
|
||||
g_system->hasFeature(OSystem::kFeatureKbdMouseSpeed) ||
|
||||
g_system->hasFeature(OSystem::kFeatureJoystickDeadzone)) {
|
||||
tab->addTab(_("Control"), "GlobalOptions_Control");
|
||||
tab->addTab(Common::convertToU32String(_("Control")), "GlobalOptions_Control");
|
||||
addControlControls(tab, "GlobalOptions_Control.");
|
||||
}
|
||||
|
||||
@ -1740,21 +1740,21 @@ void GlobalOptionsDialog::build() {
|
||||
}
|
||||
|
||||
if (!keymaps.empty()) {
|
||||
tab->addTab(_("Keymaps"), "GlobalOptions_KeyMapper");
|
||||
tab->addTab(Common::convertToU32String(_("Keymaps")), "GlobalOptions_KeyMapper");
|
||||
addKeyMapperControls(tab, "GlobalOptions_KeyMapper.", keymaps, Common::ConfigManager::kKeymapperDomain);
|
||||
}
|
||||
|
||||
//
|
||||
// 2) The audio tab
|
||||
//
|
||||
tab->addTab(_("Audio"), "GlobalOptions_Audio");
|
||||
tab->addTab(Common::convertToU32String(_("Audio")), "GlobalOptions_Audio");
|
||||
addAudioControls(tab, "GlobalOptions_Audio.");
|
||||
addSubtitleControls(tab, "GlobalOptions_Audio.");
|
||||
|
||||
if (g_system->getOverlayWidth() > 320)
|
||||
tab->addTab(_("Volume"), "GlobalOptions_Volume");
|
||||
tab->addTab(Common::convertToU32String(_("Volume")), "GlobalOptions_Volume");
|
||||
else
|
||||
tab->addTab(_c("Volume", "lowres"), "GlobalOptions_Volume");
|
||||
tab->addTab(Common::convertToU32String(_c("Volume", "lowres")), "GlobalOptions_Volume");
|
||||
addVolumeControls(tab, "GlobalOptions_Volume.");
|
||||
|
||||
// TODO: cd drive setting
|
||||
@ -1762,31 +1762,31 @@ void GlobalOptionsDialog::build() {
|
||||
//
|
||||
// 3) The MIDI tab
|
||||
//
|
||||
_midiTabId = tab->addTab(_("MIDI"), "GlobalOptions_MIDI");
|
||||
_midiTabId = tab->addTab(Common::convertToU32String(_("MIDI")), "GlobalOptions_MIDI");
|
||||
addMIDIControls(tab, "GlobalOptions_MIDI.");
|
||||
|
||||
//
|
||||
// 4) The MT-32 tab
|
||||
//
|
||||
tab->addTab(_("MT-32"), "GlobalOptions_MT32");
|
||||
tab->addTab(Common::convertToU32String(_("MT-32")), "GlobalOptions_MT32");
|
||||
addMT32Controls(tab, "GlobalOptions_MT32.");
|
||||
|
||||
//
|
||||
// 5) The Paths tab
|
||||
//
|
||||
if (g_system->getOverlayWidth() > 320)
|
||||
_pathsTabId = tab->addTab(_("Paths"), "GlobalOptions_Paths");
|
||||
_pathsTabId = tab->addTab(Common::convertToU32String(_("Paths")), "GlobalOptions_Paths");
|
||||
else
|
||||
_pathsTabId = tab->addTab(_c("Paths", "lowres"), "GlobalOptions_Paths");
|
||||
_pathsTabId = tab->addTab(Common::convertToU32String(_c("Paths", "lowres")), "GlobalOptions_Paths");
|
||||
addPathsControls(tab, "GlobalOptions_Paths.", g_system->getOverlayWidth() <= 320);
|
||||
|
||||
//
|
||||
// 6) The miscellaneous tab
|
||||
//
|
||||
if (g_system->getOverlayWidth() > 320)
|
||||
tab->addTab(_("Misc"), "GlobalOptions_Misc");
|
||||
tab->addTab(Common::convertToU32String(_("Misc")), "GlobalOptions_Misc");
|
||||
else
|
||||
tab->addTab(_c("Misc", "lowres"), "GlobalOptions_Misc");
|
||||
tab->addTab(Common::convertToU32String(_c("Misc", "lowres")), "GlobalOptions_Misc");
|
||||
ScrollContainerWidget *miscContainer = new ScrollContainerWidget(tab, "GlobalOptions_Misc.Container", "GlobalOptions_Misc_Container");
|
||||
miscContainer->setTarget(this);
|
||||
miscContainer->setBackgroundType(ThemeEngine::kWidgetBackgroundNo);
|
||||
@ -1798,9 +1798,9 @@ void GlobalOptionsDialog::build() {
|
||||
// 7) The Cloud tab (remote storages)
|
||||
//
|
||||
if (g_system->getOverlayWidth() > 320)
|
||||
tab->addTab(_("Cloud"), "GlobalOptions_Cloud");
|
||||
tab->addTab(Common::convertToU32String(_("Cloud")), "GlobalOptions_Cloud");
|
||||
else
|
||||
tab->addTab(_c("Cloud", "lowres"), "GlobalOptions_Cloud");
|
||||
tab->addTab(Common::convertToU32String(_c("Cloud", "lowres")), "GlobalOptions_Cloud");
|
||||
|
||||
ScrollContainerWidget *container = new ScrollContainerWidget(tab, "GlobalOptions_Cloud.Container", "GlobalOptions_Cloud_Container", kCloudTabContainerReflowCmd);
|
||||
container->setTarget(this);
|
||||
@ -1814,9 +1814,9 @@ void GlobalOptionsDialog::build() {
|
||||
// 8) The LAN tab (local "cloud" webserver)
|
||||
//
|
||||
if (g_system->getOverlayWidth() > 320)
|
||||
tab->addTab(_("LAN"), "GlobalOptions_Network");
|
||||
tab->addTab(Common::convertToU32String(_("LAN")), "GlobalOptions_Network");
|
||||
else
|
||||
tab->addTab(_c("LAN", "lowres"), "GlobalOptions_Network");
|
||||
tab->addTab(Common::convertToU32String(_c("LAN", "lowres")), "GlobalOptions_Network");
|
||||
addNetworkControls(tab, "GlobalOptions_Network.", g_system->getOverlayWidth() <= 320);
|
||||
#endif // USE_SDL_NET
|
||||
#endif // USE_CLOUD
|
||||
@ -1824,9 +1824,9 @@ void GlobalOptionsDialog::build() {
|
||||
//Accessibility
|
||||
#ifdef USE_TTS
|
||||
if (g_system->getOverlayWidth() > 320)
|
||||
tab->addTab(_("Accessibility"), "GlobalOptions_Accessibility");
|
||||
tab->addTab(Common::convertToU32String(_("Accessibility")), "GlobalOptions_Accessibility");
|
||||
else
|
||||
tab->addTab(_c("Accessibility", "lowres"), "GlobalOptions_Accessibility");
|
||||
tab->addTab(Common::convertToU32String(_c("Accessibility", "lowres")), "GlobalOptions_Accessibility");
|
||||
addAccessibilityControls(tab, "GlobalOptions_Accessibility.");
|
||||
#endif // USE_TTS
|
||||
|
||||
@ -1835,9 +1835,9 @@ void GlobalOptionsDialog::build() {
|
||||
_tabWidget = tab;
|
||||
|
||||
// Add OK & Cancel buttons
|
||||
new ButtonWidget(this, "GlobalOptions.Cancel", _("Cancel"), nullptr, kCloseCmd);
|
||||
new ButtonWidget(this, "GlobalOptions.Apply", _("Apply"), nullptr, kApplyCmd);
|
||||
new ButtonWidget(this, "GlobalOptions.Ok", _("OK"), nullptr, kOKCmd);
|
||||
new ButtonWidget(this, "GlobalOptions.Cancel", Common::convertToU32String(_("Cancel")), nullptr, kCloseCmd);
|
||||
new ButtonWidget(this, "GlobalOptions.Apply", Common::convertToU32String(_("Apply")), nullptr, kApplyCmd);
|
||||
new ButtonWidget(this, "GlobalOptions.Ok", Common::convertToU32String(_("OK")), nullptr, kOKCmd);
|
||||
|
||||
#ifdef GUI_ENABLE_KEYSDIALOG
|
||||
_keysDialog = new KeysDialog();
|
||||
@ -1851,24 +1851,24 @@ void GlobalOptionsDialog::build() {
|
||||
|
||||
#if !defined(__DC__)
|
||||
// Set _savePath to the current save path
|
||||
Common::String savePath(ConfMan.get("savepath", _domain));
|
||||
Common::String themePath(ConfMan.get("themepath", _domain));
|
||||
Common::String extraPath(ConfMan.get("extrapath", _domain));
|
||||
Common::U32String savePath(ConfMan.get("savepath", _domain));
|
||||
Common::U32String themePath(ConfMan.get("themepath", _domain));
|
||||
Common::U32String extraPath(ConfMan.get("extrapath", _domain));
|
||||
|
||||
if (savePath.empty() || !ConfMan.hasKey("savepath", _domain)) {
|
||||
_savePath->setLabel(_("Default"));
|
||||
_savePath->setLabel(Common::convertToU32String(_("Default")));
|
||||
} else {
|
||||
_savePath->setLabel(savePath);
|
||||
}
|
||||
|
||||
if (themePath.empty() || !ConfMan.hasKey("themepath", _domain)) {
|
||||
_themePath->setLabel(_c("None", "path"));
|
||||
_themePath->setLabel(Common::convertToU32String(_c("None", "path")));
|
||||
} else {
|
||||
_themePath->setLabel(themePath);
|
||||
}
|
||||
|
||||
if (extraPath.empty() || !ConfMan.hasKey("extrapath", _domain)) {
|
||||
_extraPath->setLabel(_c("None", "path"));
|
||||
_extraPath->setLabel(Common::convertToU32String(_c("None", "path")));
|
||||
} else {
|
||||
_extraPath->setLabel(extraPath);
|
||||
}
|
||||
@ -1900,7 +1900,7 @@ void GlobalOptionsDialog::build() {
|
||||
#ifdef USE_SDL_NET
|
||||
Common::String rootPath(ConfMan.get("rootpath", "cloud"));
|
||||
if (rootPath.empty() || !ConfMan.hasKey("rootpath", "cloud")) {
|
||||
_rootPath->setLabel(_c("None", "path"));
|
||||
_rootPath->setLabel(Common::convertToU32String(_c("None", "path")));
|
||||
} else {
|
||||
_rootPath->setLabel(rootPath);
|
||||
}
|
||||
@ -1937,26 +1937,26 @@ void GlobalOptionsDialog::addPathsControls(GuiObject *boss, const Common::String
|
||||
|
||||
// Save game path
|
||||
if (!lowres)
|
||||
new ButtonWidget(boss, prefix + "SaveButton", _("Save Path:"), _("Specifies where your saved games are put"), kChooseSaveDirCmd);
|
||||
new ButtonWidget(boss, prefix + "SaveButton", Common::convertToU32String(_("Save Path:")), _("Specifies where your saved games are put"), kChooseSaveDirCmd);
|
||||
else
|
||||
new ButtonWidget(boss, prefix + "SaveButton", _c("Save Path:", "lowres"), _("Specifies where your saved games are put"), kChooseSaveDirCmd);
|
||||
_savePath = new StaticTextWidget(boss, prefix + "SavePath", "/foo/bar", _("Specifies where your saved games are put"));
|
||||
new ButtonWidget(boss, prefix + "SaveButton", Common::convertToU32String(_c("Save Path:", "lowres")), _("Specifies where your saved games are put"), kChooseSaveDirCmd);
|
||||
_savePath = new StaticTextWidget(boss, prefix + "SavePath", Common::convertToU32String("/foo/bar"), _("Specifies where your saved games are put"));
|
||||
|
||||
_savePathClearButton = addClearButton(boss, prefix + "SavePathClearButton", kSavePathClearCmd);
|
||||
|
||||
if (!lowres)
|
||||
new ButtonWidget(boss, prefix + "ThemeButton", _("Theme Path:"), nullptr, kChooseThemeDirCmd);
|
||||
new ButtonWidget(boss, prefix + "ThemeButton", Common::convertToU32String(_("Theme Path:")), nullptr, kChooseThemeDirCmd);
|
||||
else
|
||||
new ButtonWidget(boss, prefix + "ThemeButton", _c("Theme Path:", "lowres"), nullptr, kChooseThemeDirCmd);
|
||||
_themePath = new StaticTextWidget(boss, prefix + "ThemePath", _c("None", "path"));
|
||||
new ButtonWidget(boss, prefix + "ThemeButton", Common::convertToU32String(_c("Theme Path:", "lowres")), nullptr, kChooseThemeDirCmd);
|
||||
_themePath = new StaticTextWidget(boss, prefix + "ThemePath", Common::convertToU32String(_c("None", "path")));
|
||||
|
||||
_themePathClearButton = addClearButton(boss, prefix + "ThemePathClearButton", kThemePathClearCmd);
|
||||
|
||||
if (!lowres)
|
||||
new ButtonWidget(boss, prefix + "ExtraButton", _("Extra Path:"), _("Specifies path to additional data used by all games or ScummVM"), kChooseExtraDirCmd);
|
||||
new ButtonWidget(boss, prefix + "ExtraButton", Common::convertToU32String(_("Extra Path:")), _("Specifies path to additional data used by all games or ScummVM"), kChooseExtraDirCmd);
|
||||
else
|
||||
new ButtonWidget(boss, prefix + "ExtraButton", _c("Extra Path:", "lowres"), _("Specifies path to additional data used by all games or ScummVM"), kChooseExtraDirCmd);
|
||||
_extraPath = new StaticTextWidget(boss, prefix + "ExtraPath", _c("None", "path"), _("Specifies path to additional data used by all games or ScummVM"));
|
||||
new ButtonWidget(boss, prefix + "ExtraButton", Common::convertToU32String(_c("Extra Path:", "lowres")), _("Specifies path to additional data used by all games or ScummVM"), kChooseExtraDirCmd);
|
||||
_extraPath = new StaticTextWidget(boss, prefix + "ExtraPath", Common::convertToU32String(_c("None", "path")), _("Specifies path to additional data used by all games or ScummVM"));
|
||||
|
||||
_extraPathClearButton = addClearButton(boss, prefix + "ExtraPathClearButton", kExtraPathClearCmd);
|
||||
|
||||
@ -1973,29 +1973,29 @@ void GlobalOptionsDialog::addPathsControls(GuiObject *boss, const Common::String
|
||||
}
|
||||
|
||||
void GlobalOptionsDialog::addMiscControls(GuiObject *boss, const Common::String &prefix, bool lowres) {
|
||||
new ButtonWidget(boss, prefix + "ThemeButton", _("Theme:"), nullptr, kChooseThemeCmd);
|
||||
new ButtonWidget(boss, prefix + "ThemeButton", Common::convertToU32String(_("Theme:")), nullptr, kChooseThemeCmd);
|
||||
_curTheme = new StaticTextWidget(boss, prefix + "CurTheme", g_gui.theme()->getThemeName());
|
||||
|
||||
|
||||
_rendererPopUpDesc = new StaticTextWidget(boss, prefix + "RendererPopupDesc", _("GUI renderer:"));
|
||||
_rendererPopUpDesc = new StaticTextWidget(boss, prefix + "RendererPopupDesc", Common::convertToU32String(_("GUI renderer:")));
|
||||
_rendererPopUp = new PopUpWidget(boss, prefix + "RendererPopup");
|
||||
|
||||
if (!lowres) {
|
||||
for (uint i = 1; i < GUI::ThemeEngine::_rendererModesSize; ++i)
|
||||
_rendererPopUp->appendEntry(_(GUI::ThemeEngine::_rendererModes[i].name), GUI::ThemeEngine::_rendererModes[i].mode);
|
||||
_rendererPopUp->appendEntry(Common::convertToU32String(_(GUI::ThemeEngine::_rendererModes[i].name)), GUI::ThemeEngine::_rendererModes[i].mode);
|
||||
} else {
|
||||
for (uint i = 1; i < GUI::ThemeEngine::_rendererModesSize; ++i)
|
||||
_rendererPopUp->appendEntry(_(GUI::ThemeEngine::_rendererModes[i].shortname), GUI::ThemeEngine::_rendererModes[i].mode);
|
||||
_rendererPopUp->appendEntry(Common::convertToU32String(_(GUI::ThemeEngine::_rendererModes[i].shortname)), GUI::ThemeEngine::_rendererModes[i].mode);
|
||||
}
|
||||
|
||||
if (!lowres)
|
||||
_autosavePeriodPopUpDesc = new StaticTextWidget(boss, prefix + "AutosavePeriodPopupDesc", _("Autosave:"));
|
||||
_autosavePeriodPopUpDesc = new StaticTextWidget(boss, prefix + "AutosavePeriodPopupDesc", Common::convertToU32String(_("Autosave:")));
|
||||
else
|
||||
_autosavePeriodPopUpDesc = new StaticTextWidget(boss, prefix + "AutosavePeriodPopupDesc", _c("Autosave:", "lowres"));
|
||||
_autosavePeriodPopUpDesc = new StaticTextWidget(boss, prefix + "AutosavePeriodPopupDesc", Common::convertToU32String(_c("Autosave:", "lowres")));
|
||||
_autosavePeriodPopUp = new PopUpWidget(boss, prefix + "AutosavePeriodPopup");
|
||||
|
||||
for (int i = 0; savePeriodLabels[i]; i++) {
|
||||
_autosavePeriodPopUp->appendEntry(_(savePeriodLabels[i]), savePeriodValues[i]);
|
||||
_autosavePeriodPopUp->appendEntry(Common::convertToU32String(_(savePeriodLabels[i])), savePeriodValues[i]);
|
||||
}
|
||||
|
||||
#ifdef GUI_ENABLE_KEYSDIALOG
|
||||
@ -2006,17 +2006,17 @@ void GlobalOptionsDialog::addMiscControls(GuiObject *boss, const Common::String
|
||||
|
||||
|
||||
#ifdef USE_TRANSLATION
|
||||
_guiLanguagePopUpDesc = new StaticTextWidget(boss, prefix + "GuiLanguagePopupDesc", _("GUI language:"), _("Language of ScummVM GUI"));
|
||||
_guiLanguagePopUpDesc = new StaticTextWidget(boss, prefix + "GuiLanguagePopupDesc", Common::convertToU32String(_("GUI language:")), _("Language of ScummVM GUI"));
|
||||
_guiLanguagePopUp = new PopUpWidget(boss, prefix + "GuiLanguagePopup");
|
||||
#ifdef USE_DETECTLANG
|
||||
_guiLanguagePopUp->appendEntry(_("<default>"), Common::kTranslationAutodetectId);
|
||||
_guiLanguagePopUp->appendEntry(Common::convertToU32String(_("<default>")), Common::kTranslationAutodetectId);
|
||||
#endif // USE_DETECTLANG
|
||||
_guiLanguagePopUp->appendEntry("English", Common::kTranslationBuiltinId);
|
||||
_guiLanguagePopUp->appendEntry("", 0);
|
||||
_guiLanguagePopUp->appendEntry(Common::convertToU32String("English"), Common::kTranslationBuiltinId);
|
||||
_guiLanguagePopUp->appendEntry(Common::convertToU32String(""), 0);
|
||||
Common::TLangArray languages = TransMan.getSupportedLanguageNames();
|
||||
Common::TLangArray::iterator lang = languages.begin();
|
||||
while (lang != languages.end()) {
|
||||
_guiLanguagePopUp->appendEntry(lang->name, lang->id);
|
||||
_guiLanguagePopUp->appendEntry(Common::convertToU32String(lang->name), lang->id);
|
||||
lang++;
|
||||
}
|
||||
|
||||
@ -2046,7 +2046,7 @@ void GlobalOptionsDialog::addMiscControls(GuiObject *boss, const Common::String
|
||||
|
||||
if (g_system->hasFeature(OSystem::kFeatureSystemBrowserDialog)) {
|
||||
_useSystemDialogsCheckbox = new CheckboxWidget(boss, prefix + "UseSystemDialogs",
|
||||
_("Use native system file browser"),
|
||||
Common::convertToU32String(_("Use native system file browser")),
|
||||
_("Use the native system file browser instead of the ScummVM one to select a file or directory.")
|
||||
);
|
||||
|
||||
@ -2073,7 +2073,7 @@ void GlobalOptionsDialog::addMiscControls(GuiObject *boss, const Common::String
|
||||
#ifdef USE_CLOUD
|
||||
#ifdef USE_LIBCURL
|
||||
void GlobalOptionsDialog::addCloudControls(GuiObject *boss, const Common::String &prefix, bool lowres) {
|
||||
_storagePopUpDesc = new StaticTextWidget(boss, prefix + "StoragePopupDesc", _("Active storage:"), _("Active cloud storage"));
|
||||
_storagePopUpDesc = new StaticTextWidget(boss, prefix + "StoragePopupDesc", Common::convertToU32String(_("Active storage:")), _("Active cloud storage"));
|
||||
_storagePopUp = new PopUpWidget(boss, prefix + "StoragePopup");
|
||||
Common::StringArray list = CloudMan.listStorages();
|
||||
for (uint32 i = 0; i < list.size(); ++i) {
|
||||
@ -2082,51 +2082,51 @@ void GlobalOptionsDialog::addCloudControls(GuiObject *boss, const Common::String
|
||||
_storagePopUp->setSelected(_selectedStorageIndex);
|
||||
|
||||
if (lowres)
|
||||
_storageDisabledHint = new StaticTextWidget(boss, prefix + "StorageDisabledHint", _c("4. Storage is not yet enabled. Verify that username is correct and enable it:", "lowres"));
|
||||
_storageDisabledHint = new StaticTextWidget(boss, prefix + "StorageDisabledHint", Common::convertToU32String(_c("4. Storage is not yet enabled. Verify that username is correct and enable it:", "lowres")));
|
||||
else
|
||||
_storageDisabledHint = new StaticTextWidget(boss, prefix + "StorageDisabledHint", _("4. Storage is not yet enabled. Verify that username is correct and enable it:"));
|
||||
_storageEnableButton = new ButtonWidget(boss, prefix + "StorageEnableButton", _("Enable storage"), _("Confirm you want to use this account for this storage"), kEnableStorageCmd);
|
||||
_storageDisabledHint = new StaticTextWidget(boss, prefix + "StorageDisabledHint", Common::convertToU32String(_("4. Storage is not yet enabled. Verify that username is correct and enable it:")));
|
||||
_storageEnableButton = new ButtonWidget(boss, prefix + "StorageEnableButton", Common::convertToU32String(_("Enable storage")), _("Confirm you want to use this account for this storage"), kEnableStorageCmd);
|
||||
|
||||
_storageUsernameDesc = new StaticTextWidget(boss, prefix + "StorageUsernameDesc", _("Username:"), _("Username used by this storage"));
|
||||
_storageUsername = new StaticTextWidget(boss, prefix + "StorageUsernameLabel", _("<none>"), "", ThemeEngine::kFontStyleNormal);
|
||||
_storageUsernameDesc = new StaticTextWidget(boss, prefix + "StorageUsernameDesc", Common::convertToU32String(_("Username:")), _("Username used by this storage"));
|
||||
_storageUsername = new StaticTextWidget(boss, prefix + "StorageUsernameLabel", Common::convertToU32String(_("<none>")), "", ThemeEngine::kFontStyleNormal);
|
||||
|
||||
_storageUsedSpaceDesc = new StaticTextWidget(boss, prefix + "StorageUsedSpaceDesc", _("Used space:"), _("Space used by ScummVM's saved games on this storage"));
|
||||
_storageUsedSpace = new StaticTextWidget(boss, prefix + "StorageUsedSpaceLabel", "0 bytes", "", ThemeEngine::kFontStyleNormal);
|
||||
_storageUsedSpaceDesc = new StaticTextWidget(boss, prefix + "StorageUsedSpaceDesc", Common::convertToU32String(_("Used space:")), _("Space used by ScummVM's saved games on this storage"));
|
||||
_storageUsedSpace = new StaticTextWidget(boss, prefix + "StorageUsedSpaceLabel", Common::convertToU32String("0 bytes"), "", ThemeEngine::kFontStyleNormal);
|
||||
|
||||
_storageLastSyncDesc = new StaticTextWidget(boss, prefix + "StorageLastSyncDesc", _("Last sync:"), _("When was the last time saved games were synced with this storage"));
|
||||
_storageLastSync = new StaticTextWidget(boss, prefix + "StorageLastSyncLabel", _("<never>"), "", ThemeEngine::kFontStyleNormal);
|
||||
_storageLastSyncDesc = new StaticTextWidget(boss, prefix + "StorageLastSyncDesc", Common::convertToU32String(_("Last sync:")), _("When was the last time saved games were synced with this storage"));
|
||||
_storageLastSync = new StaticTextWidget(boss, prefix + "StorageLastSyncLabel", Common::convertToU32String(_("<never>")), "", ThemeEngine::kFontStyleNormal);
|
||||
if (lowres)
|
||||
_storageSyncHint = new StaticTextWidget(boss, prefix + "StorageSyncHint", _c("Saved games sync automatically on launch, after saving and on loading.", "lowres"), "", ThemeEngine::kFontStyleNormal);
|
||||
_storageSyncHint = new StaticTextWidget(boss, prefix + "StorageSyncHint", Common::convertToU32String(_c("Saved games sync automatically on launch, after saving and on loading.", "lowres")), "", ThemeEngine::kFontStyleNormal);
|
||||
else
|
||||
_storageSyncHint = new StaticTextWidget(boss, prefix + "StorageSyncHint", _("Saved games sync automatically on launch, after saving and on loading."), "", ThemeEngine::kFontStyleNormal);
|
||||
_storageSyncSavesButton = new ButtonWidget(boss, prefix + "SyncSavesButton", _("Sync now"), _("Start saved games sync"), kSyncSavesStorageCmd);
|
||||
_storageSyncHint = new StaticTextWidget(boss, prefix + "StorageSyncHint", Common::convertToU32String(_("Saved games sync automatically on launch, after saving and on loading.")), "", ThemeEngine::kFontStyleNormal);
|
||||
_storageSyncSavesButton = new ButtonWidget(boss, prefix + "SyncSavesButton", Common::convertToU32String(_("Sync now")), _("Start saved games sync"), kSyncSavesStorageCmd);
|
||||
|
||||
if (lowres)
|
||||
_storageDownloadHint = new StaticTextWidget(boss, prefix + "StorageDownloadHint", _c("You can download game files from your cloud ScummVM folder:", "lowres"));
|
||||
_storageDownloadHint = new StaticTextWidget(boss, prefix + "StorageDownloadHint", Common::convertToU32String(_c("You can download game files from your cloud ScummVM folder:", "lowres")));
|
||||
else
|
||||
_storageDownloadHint = new StaticTextWidget(boss, prefix + "StorageDownloadHint", _("You can download game files from your cloud ScummVM folder:"));
|
||||
_storageDownloadButton = new ButtonWidget(boss, prefix + "DownloadButton", _("Download game files"), _("Open downloads manager dialog"), kDownloadStorageCmd);
|
||||
_storageDownloadHint = new StaticTextWidget(boss, prefix + "StorageDownloadHint", Common::convertToU32String(_("You can download game files from your cloud ScummVM folder:")));
|
||||
_storageDownloadButton = new ButtonWidget(boss, prefix + "DownloadButton", Common::convertToU32String(_("Download game files")), _("Open downloads manager dialog"), kDownloadStorageCmd);
|
||||
|
||||
if (lowres)
|
||||
_storageDisconnectHint = new StaticTextWidget(boss, prefix + "StorageDisconnectHint", _c("To change account for this storage, disconnect and connect again:", "lowres"));
|
||||
_storageDisconnectHint = new StaticTextWidget(boss, prefix + "StorageDisconnectHint", Common::convertToU32String(_c("To change account for this storage, disconnect and connect again:", "lowres")));
|
||||
else
|
||||
_storageDisconnectHint = new StaticTextWidget(boss, prefix + "StorageDisconnectHint", _("To change account for this storage, disconnect and connect again:"));
|
||||
_storageDisconnectButton = new ButtonWidget(boss, prefix + "DisconnectButton", _("Disconnect"), _("Stop using this storage on this device"), kDisconnectStorageCmd);
|
||||
_storageDisconnectHint = new StaticTextWidget(boss, prefix + "StorageDisconnectHint", Common::convertToU32String(_("To change account for this storage, disconnect and connect again:")));
|
||||
_storageDisconnectButton = new ButtonWidget(boss, prefix + "DisconnectButton", Common::convertToU32String(_("Disconnect")), _("Stop using this storage on this device"), kDisconnectStorageCmd);
|
||||
|
||||
if (lowres)
|
||||
_storageWizardNotConnectedHint = new StaticTextWidget(boss, prefix + "StorageWizardNotConnectedHint", _c("This storage is not connected yet! To connect,", "lowres"));
|
||||
_storageWizardNotConnectedHint = new StaticTextWidget(boss, prefix + "StorageWizardNotConnectedHint", Common::convertToU32String(_c("This storage is not connected yet! To connect,", "lowres")));
|
||||
else
|
||||
_storageWizardNotConnectedHint = new StaticTextWidget(boss, prefix + "StorageWizardNotConnectedHint", _("This storage is not connected yet! To connect,"));
|
||||
_storageWizardOpenLinkHint = new StaticTextWidget(boss, prefix + "StorageWizardOpenLinkHint", _("1. Open this link:"));
|
||||
_storageWizardLink = new ButtonWidget(boss, prefix + "StorageWizardLink", "https://cloud.scummvm.org/", _("Open URL"), kOpenUrlStorageCmd);
|
||||
_storageWizardNotConnectedHint = new StaticTextWidget(boss, prefix + "StorageWizardNotConnectedHint", Common::convertToU32String(_("This storage is not connected yet! To connect,")));
|
||||
_storageWizardOpenLinkHint = new StaticTextWidget(boss, prefix + "StorageWizardOpenLinkHint", Common::convertToU32String(_("1. Open this link:")));
|
||||
_storageWizardLink = new ButtonWidget(boss, prefix + "StorageWizardLink", Common::convertToU32String("https://cloud.scummvm.org/"), _("Open URL"), kOpenUrlStorageCmd);
|
||||
if (lowres)
|
||||
_storageWizardCodeHint = new StaticTextWidget(boss, prefix + "StorageWizardCodeHint", _c("2. Get the code and enter it here:", "lowres"));
|
||||
_storageWizardCodeHint = new StaticTextWidget(boss, prefix + "StorageWizardCodeHint", Common::convertToU32String(_c("2. Get the code and enter it here:", "lowres")));
|
||||
else
|
||||
_storageWizardCodeHint = new StaticTextWidget(boss, prefix + "StorageWizardCodeHint", _("2. Get the code and enter it here:"));
|
||||
_storageWizardCodeHint = new StaticTextWidget(boss, prefix + "StorageWizardCodeHint", Common::convertToU32String(_("2. Get the code and enter it here:")));
|
||||
_storageWizardCodeBox = new EditTextWidget(boss, prefix + "StorageWizardCodeBox", "", nullptr, 0, 0, ThemeEngine::kFontStyleConsole);
|
||||
_storageWizardPasteButton = new ButtonWidget(boss, prefix + "StorageWizardPasteButton", _("Paste"), _("Paste code from clipboard"), kPasteCodeStorageCmd);
|
||||
_storageWizardConnectButton = new ButtonWidget(boss, prefix + "StorageWizardConnectButton", _("3. Connect"), _("Connect your cloud storage account"), kConnectStorageCmd);
|
||||
_storageWizardConnectionStatusHint = new StaticTextWidget(boss, prefix + "StorageWizardConnectionStatusHint", "...");
|
||||
_storageWizardPasteButton = new ButtonWidget(boss, prefix + "StorageWizardPasteButton", Common::convertToU32String(_("Paste")), _("Paste code from clipboard"), kPasteCodeStorageCmd);
|
||||
_storageWizardConnectButton = new ButtonWidget(boss, prefix + "StorageWizardConnectButton", Common::convertToU32String(_("3. Connect")), _("Connect your cloud storage account"), kConnectStorageCmd);
|
||||
_storageWizardConnectionStatusHint = new StaticTextWidget(boss, prefix + "StorageWizardConnectionStatusHint", Common::convertToU32String("..."));
|
||||
|
||||
setupCloudTab();
|
||||
}
|
||||
@ -2134,29 +2134,29 @@ void GlobalOptionsDialog::addCloudControls(GuiObject *boss, const Common::String
|
||||
|
||||
#ifdef USE_SDL_NET
|
||||
void GlobalOptionsDialog::addNetworkControls(GuiObject *boss, const Common::String &prefix, bool lowres) {
|
||||
_runServerButton = new ButtonWidget(boss, prefix + "RunServerButton", _("Run server"), _("Run local webserver"), kRunServerCmd);
|
||||
_serverInfoLabel = new StaticTextWidget(boss, prefix + "ServerInfoLabel", _("Not running"));
|
||||
_runServerButton = new ButtonWidget(boss, prefix + "RunServerButton", Common::convertToU32String(_("Run server")), _("Run local webserver"), kRunServerCmd);
|
||||
_serverInfoLabel = new StaticTextWidget(boss, prefix + "ServerInfoLabel", Common::convertToU32String(_("Not running")));
|
||||
|
||||
// Root path
|
||||
if (lowres)
|
||||
_rootPathButton = new ButtonWidget(boss, prefix + "RootPathButton", _c("/root/ Path:", "lowres"), _("Select which directory will be shown as /root/ in the Files Manager"), kChooseRootDirCmd);
|
||||
_rootPathButton = new ButtonWidget(boss, prefix + "RootPathButton", Common::convertToU32String(_c("/root/ Path:", "lowres")), _("Select which directory will be shown as /root/ in the Files Manager"), kChooseRootDirCmd);
|
||||
else
|
||||
_rootPathButton = new ButtonWidget(boss, prefix + "RootPathButton", _("/root/ Path:"), _("Select which directory will be shown as /root/ in the Files Manager"), kChooseRootDirCmd);
|
||||
_rootPath = new StaticTextWidget(boss, prefix + "RootPath", "/foo/bar", _("Select which directory will be shown as /root/ in the Files Manager"));
|
||||
_rootPathButton = new ButtonWidget(boss, prefix + "RootPathButton", Common::convertToU32String(_("/root/ Path:")), _("Select which directory will be shown as /root/ in the Files Manager"), kChooseRootDirCmd);
|
||||
_rootPath = new StaticTextWidget(boss, prefix + "RootPath", Common::convertToU32String("/foo/bar"), _("Select which directory will be shown as /root/ in the Files Manager"));
|
||||
_rootPathClearButton = addClearButton(boss, prefix + "RootPathClearButton", kRootPathClearCmd);
|
||||
|
||||
uint32 port = Networking::LocalWebserver::getPort();
|
||||
|
||||
_serverPortDesc = new StaticTextWidget(boss, prefix + "ServerPortDesc", _("Server's port:"), _("Port for server to use"));
|
||||
_serverPortDesc = new StaticTextWidget(boss, prefix + "ServerPortDesc", Common::convertToU32String(_("Server's port:")), _("Port for server to use"));
|
||||
_serverPort = new EditTextWidget(boss, prefix + "ServerPortEditText", Common::String::format("%u", port), nullptr);
|
||||
_serverPortClearButton = addClearButton(boss, prefix + "ServerPortClearButton", kServerPortClearCmd);
|
||||
|
||||
if (lowres) {
|
||||
_featureDescriptionLine1 = new StaticTextWidget(boss, prefix + "FeatureDescriptionLine1", _c("Run server to manage files with browser (in the same network).", "lowres"), "", ThemeEngine::kFontStyleNormal);
|
||||
_featureDescriptionLine2 = new StaticTextWidget(boss, prefix + "FeatureDescriptionLine2", _c("Closing options dialog will stop the server.", "lowres"), "", ThemeEngine::kFontStyleNormal);
|
||||
_featureDescriptionLine1 = new StaticTextWidget(boss, prefix + "FeatureDescriptionLine1", Common::convertToU32String(_c("Run server to manage files with browser (in the same network).", "lowres")), "", ThemeEngine::kFontStyleNormal);
|
||||
_featureDescriptionLine2 = new StaticTextWidget(boss, prefix + "FeatureDescriptionLine2", Common::convertToU32String(_c("Closing options dialog will stop the server.", "lowres")), "", ThemeEngine::kFontStyleNormal);
|
||||
} else {
|
||||
_featureDescriptionLine1 = new StaticTextWidget(boss, prefix + "FeatureDescriptionLine1", _("Run server to manage files with browser (in the same network)."), "", ThemeEngine::kFontStyleNormal);
|
||||
_featureDescriptionLine2 = new StaticTextWidget(boss, prefix + "FeatureDescriptionLine2", _("Closing options dialog will stop the server."), "", ThemeEngine::kFontStyleNormal);
|
||||
_featureDescriptionLine1 = new StaticTextWidget(boss, prefix + "FeatureDescriptionLine1", Common::convertToU32String(_("Run server to manage files with browser (in the same network).")), "", ThemeEngine::kFontStyleNormal);
|
||||
_featureDescriptionLine2 = new StaticTextWidget(boss, prefix + "FeatureDescriptionLine2", Common::convertToU32String(_("Closing options dialog will stop the server.")), "", ThemeEngine::kFontStyleNormal);
|
||||
}
|
||||
|
||||
reflowNetworkTabLayout();
|
||||
@ -2168,7 +2168,7 @@ void GlobalOptionsDialog::addNetworkControls(GuiObject *boss, const Common::Stri
|
||||
#ifdef USE_TTS
|
||||
void GlobalOptionsDialog::addAccessibilityControls(GuiObject *boss, const Common::String &prefix) {
|
||||
_ttsCheckbox = new CheckboxWidget(boss, prefix + "TTSCheckbox",
|
||||
_("Use Text to speech"), _("Will read text in gui on mouse over."));
|
||||
Common::convertToU32String(_("Use Text to speech")), _("Will read text in gui on mouse over."));
|
||||
if (ConfMan.hasKey("tts_enabled"))
|
||||
_ttsCheckbox->setState(ConfMan.getBool("tts_enabled", _domain));
|
||||
else
|
||||
@ -2181,7 +2181,7 @@ void GlobalOptionsDialog::addAccessibilityControls(GuiObject *boss, const Common
|
||||
voices = ttsMan->getVoicesArray();
|
||||
|
||||
if (voices.empty())
|
||||
_ttsVoiceSelectionPopUp->appendEntry(_("None"), 0);
|
||||
_ttsVoiceSelectionPopUp->appendEntry(Common::convertToU32String(_("None")), 0);
|
||||
else {
|
||||
_ttsVoiceSelectionPopUp->appendEntry(_("<default>"));
|
||||
for(unsigned i = 0; i < voices.size(); i++)
|
||||
@ -2200,19 +2200,19 @@ void GlobalOptionsDialog::apply() {
|
||||
|
||||
bool isRebuildNeeded = false;
|
||||
|
||||
Common::String savePath(_savePath->getLabel());
|
||||
Common::String savePath(Common::convertFromU32String(_savePath->getLabel()));
|
||||
if (!savePath.empty() && (savePath != _("Default")))
|
||||
ConfMan.set("savepath", savePath, _domain);
|
||||
else
|
||||
ConfMan.removeKey("savepath", _domain);
|
||||
|
||||
Common::String themePath(_themePath->getLabel());
|
||||
Common::String themePath(Common::convertFromU32String(_themePath->getLabel()));
|
||||
if (!themePath.empty() && (themePath != _c("None", "path")))
|
||||
ConfMan.set("themepath", themePath, _domain);
|
||||
else
|
||||
ConfMan.removeKey("themepath", _domain);
|
||||
|
||||
Common::String extraPath(_extraPath->getLabel());
|
||||
Common::String extraPath(Common::convertFromU32String(_extraPath->getLabel()));
|
||||
if (!extraPath.empty() && (extraPath != _c("None", "path")))
|
||||
ConfMan.set("extrapath", extraPath, _domain);
|
||||
else
|
||||
@ -2228,7 +2228,7 @@ void GlobalOptionsDialog::apply() {
|
||||
|
||||
#ifdef USE_CLOUD
|
||||
#ifdef USE_SDL_NET
|
||||
Common::String rootPath(_rootPath->getLabel());
|
||||
Common::String rootPath(Common::convertFromU32String(_rootPath->getLabel()));
|
||||
if (!rootPath.empty() && (rootPath != _c("None", "path")))
|
||||
ConfMan.set("rootpath", rootPath, "cloud");
|
||||
else
|
||||
@ -2459,13 +2459,13 @@ void GlobalOptionsDialog::handleCommand(CommandSender *sender, uint32 cmd, uint3
|
||||
#endif
|
||||
#endif
|
||||
case kThemePathClearCmd:
|
||||
_themePath->setLabel(_c("None", "path"));
|
||||
_themePath->setLabel(Common::convertToU32String(_c("None", "path")));
|
||||
break;
|
||||
case kExtraPathClearCmd:
|
||||
_extraPath->setLabel(_c("None", "path"));
|
||||
_extraPath->setLabel(Common::convertToU32String(_c("None", "path")));
|
||||
break;
|
||||
case kSavePathClearCmd:
|
||||
_savePath->setLabel(_("Default"));
|
||||
_savePath->setLabel(Common::convertToU32String(_("Default")));
|
||||
break;
|
||||
#ifdef DYNAMIC_MODULES
|
||||
case kPluginsPathClearCmd:
|
||||
@ -2475,7 +2475,7 @@ void GlobalOptionsDialog::handleCommand(CommandSender *sender, uint32 cmd, uint3
|
||||
#ifdef USE_CLOUD
|
||||
#ifdef USE_SDL_NET
|
||||
case kRootPathClearCmd:
|
||||
_rootPath->setLabel(_c("None", "path"));
|
||||
_rootPath->setLabel(Common::convertToU32String(_c("None", "path")));
|
||||
break;
|
||||
#endif
|
||||
#endif
|
||||
@ -2603,7 +2603,7 @@ void GlobalOptionsDialog::handleCommand(CommandSender *sender, uint32 cmd, uint3
|
||||
}
|
||||
|
||||
if (_storageWizardConnectionStatusHint)
|
||||
_storageWizardConnectionStatusHint->setLabel(_("Connecting..."));
|
||||
_storageWizardConnectionStatusHint->setLabel(Common::convertToU32String(_("Connecting...")));
|
||||
CloudMan.connectStorage(
|
||||
_selectedStorageIndex, code,
|
||||
new Common::Callback<GlobalOptionsDialog, Networking::ErrorResponse>(this, &GlobalOptionsDialog::storageConnectionCallback)
|
||||
@ -2926,7 +2926,7 @@ void GlobalOptionsDialog::reflowNetworkTabLayout() {
|
||||
|
||||
if (_runServerButton) {
|
||||
_runServerButton->setVisible(true);
|
||||
_runServerButton->setLabel(_(serverIsRunning ? "Stop server" : "Run server"));
|
||||
_runServerButton->setLabel(Common::convertToU32String(_(serverIsRunning ? "Stop server" : "Run server")));
|
||||
_runServerButton->setTooltip(_(serverIsRunning ? "Stop local webserver" : "Run local webserver"));
|
||||
}
|
||||
if (_serverInfoLabel) {
|
||||
@ -2934,7 +2934,7 @@ void GlobalOptionsDialog::reflowNetworkTabLayout() {
|
||||
if (serverIsRunning)
|
||||
_serverInfoLabel->setLabel(LocalServer.getAddress());
|
||||
else
|
||||
_serverInfoLabel->setLabel(_("Not running"));
|
||||
_serverInfoLabel->setLabel(Common::convertToU32String(_("Not running")));
|
||||
}
|
||||
if (_rootPathButton) _rootPathButton->setVisible(true);
|
||||
if (_rootPath) _rootPath->setVisible(true);
|
||||
|
@ -68,10 +68,10 @@ enum {
|
||||
};
|
||||
|
||||
PredictiveDialog::PredictiveDialog() : Dialog("Predictive") {
|
||||
new StaticTextWidget(this, "Predictive.Headline", "Enter Text");
|
||||
new StaticTextWidget(this, "Predictive.Headline", Common::convertToU32String"Enter Text"));
|
||||
|
||||
_button[kCancelAct] = new ButtonWidget(this, "Predictive.Cancel", _("Cancel") , nullptr, kCancelCmd);
|
||||
_button[kOkAct] = new ButtonWidget(this, "Predictive.OK", _("Ok") , nullptr, kOkCmd);
|
||||
_button[kCancelAct] = new ButtonWidget(this, "Predictive.Cancel", Common::convertToU32String_("Cancel")) , nullptr, kCancelCmd);
|
||||
_button[kOkAct] = new ButtonWidget(this, "Predictive.OK", Common::convertToU32String_("Ok")) , nullptr, kOkCmd);
|
||||
|
||||
if (g_gui.useRTL()) {
|
||||
/** If using RTL, swap the internal name of odd columns, to be flipped again when drawing.
|
||||
@ -79,32 +79,32 @@ PredictiveDialog::PredictiveDialog() : Dialog("Predictive") {
|
||||
The rest, like okButton, cancel, etc are all flipped.
|
||||
*/
|
||||
|
||||
_button[kButton3Act] = new ButtonWidget(this, "Predictive.Button1", "3 def" , nullptr, kBut3Cmd);
|
||||
_button[kButton2Act] = new ButtonWidget(this, "Predictive.Button2", "2 abc" , nullptr, kBut2Cmd);
|
||||
_button[kButton1Act] = new ButtonWidget(this, "Predictive.Button3", "1 `-.&" , nullptr, kBut1Cmd);
|
||||
_button[kButton6Act] = new ButtonWidget(this, "Predictive.Button4", "6 mno" , nullptr, kBut6Cmd);
|
||||
_button[kButton5Act] = new ButtonWidget(this, "Predictive.Button5", "5 jkl" , nullptr, kBut5Cmd);
|
||||
_button[kButton4Act] = new ButtonWidget(this, "Predictive.Button6", "4 ghi" , nullptr, kBut4Cmd);
|
||||
_button[kButton9Act] = new ButtonWidget(this, "Predictive.Button7", "9 wxyz" , nullptr, kBut9Cmd);
|
||||
_button[kButton8Act] = new ButtonWidget(this, "Predictive.Button8", "8 tuv" , nullptr, kBut8Cmd);
|
||||
_button[kButton7Act] = new ButtonWidget(this, "Predictive.Button9", "7 pqrs" , nullptr, kBut7Cmd);
|
||||
_button[kButton0Act] = new ButtonWidget(this, "Predictive.Button0", "0" , nullptr, kBut0Cmd);
|
||||
_button[kButton3Act] = new ButtonWidget(this, "Predictive.Button1", Common::convertToU32String("3 def" ), nullptr, kBut3Cmd);
|
||||
_button[kButton2Act] = new ButtonWidget(this, "Predictive.Button2", Common::convertToU32String("2 abc" ), nullptr, kBut2Cmd);
|
||||
_button[kButton1Act] = new ButtonWidget(this, "Predictive.Button3", Common::convertToU32String("1 `-.&" ), nullptr, kBut1Cmd);
|
||||
_button[kButton6Act] = new ButtonWidget(this, "Predictive.Button4", Common::convertToU32String("6 mno" ), nullptr, kBut6Cmd);
|
||||
_button[kButton5Act] = new ButtonWidget(this, "Predictive.Button5", Common::convertToU32String("5 jkl" ), nullptr, kBut5Cmd);
|
||||
_button[kButton4Act] = new ButtonWidget(this, "Predictive.Button6", Common::convertToU32String("4 ghi" ), nullptr, kBut4Cmd);
|
||||
_button[kButton9Act] = new ButtonWidget(this, "Predictive.Button7", Common::convertToU32String("9 wxyz" ), nullptr, kBut9Cmd);
|
||||
_button[kButton8Act] = new ButtonWidget(this, "Predictive.Button8", Common::convertToU32String("8 tuv" ), nullptr, kBut8Cmd);
|
||||
_button[kButton7Act] = new ButtonWidget(this, "Predictive.Button9", Common::convertToU32String("7 pqrs" ), nullptr, kBut7Cmd);
|
||||
_button[kButton0Act] = new ButtonWidget(this, "Predictive.Button0", Common::convertToU32String("0" ), nullptr, kBut0Cmd);
|
||||
} else {
|
||||
_button[kButton1Act] = new ButtonWidget(this, "Predictive.Button1", "1 `-.&" , nullptr, kBut1Cmd);
|
||||
_button[kButton2Act] = new ButtonWidget(this, "Predictive.Button2", "2 abc" , nullptr, kBut2Cmd);
|
||||
_button[kButton3Act] = new ButtonWidget(this, "Predictive.Button3", "3 def" , nullptr, kBut3Cmd);
|
||||
_button[kButton4Act] = new ButtonWidget(this, "Predictive.Button4", "4 ghi" , nullptr, kBut4Cmd);
|
||||
_button[kButton5Act] = new ButtonWidget(this, "Predictive.Button5", "5 jkl" , nullptr, kBut5Cmd);
|
||||
_button[kButton6Act] = new ButtonWidget(this, "Predictive.Button6", "6 mno" , nullptr, kBut6Cmd);
|
||||
_button[kButton7Act] = new ButtonWidget(this, "Predictive.Button7", "7 pqrs" , nullptr, kBut7Cmd);
|
||||
_button[kButton8Act] = new ButtonWidget(this, "Predictive.Button8", "8 tuv" , nullptr, kBut8Cmd);
|
||||
_button[kButton9Act] = new ButtonWidget(this, "Predictive.Button9", "9 wxyz" , nullptr, kBut9Cmd);
|
||||
_button[kButton0Act] = new ButtonWidget(this, "Predictive.Button0", "0" , nullptr, kBut0Cmd);
|
||||
_button[kButton1Act] = new ButtonWidget(this, "Predictive.Button1", Common::convertToU32String("1 `-.&" ), nullptr, kBut1Cmd);
|
||||
_button[kButton2Act] = new ButtonWidget(this, "Predictive.Button2", Common::convertToU32String("2 abc" ), nullptr, kBut2Cmd);
|
||||
_button[kButton3Act] = new ButtonWidget(this, "Predictive.Button3", Common::convertToU32String("3 def" ), nullptr, kBut3Cmd);
|
||||
_button[kButton4Act] = new ButtonWidget(this, "Predictive.Button4", Common::convertToU32String("4 ghi" ), nullptr, kBut4Cmd);
|
||||
_button[kButton5Act] = new ButtonWidget(this, "Predictive.Button5", Common::convertToU32String("5 jkl" ), nullptr, kBut5Cmd);
|
||||
_button[kButton6Act] = new ButtonWidget(this, "Predictive.Button6", Common::convertToU32String("6 mno" ), nullptr, kBut6Cmd);
|
||||
_button[kButton7Act] = new ButtonWidget(this, "Predictive.Button7", Common::convertToU32String("7 pqrs" ), nullptr, kBut7Cmd);
|
||||
_button[kButton8Act] = new ButtonWidget(this, "Predictive.Button8", Common::convertToU32String("8 tuv" ), nullptr, kBut8Cmd);
|
||||
_button[kButton9Act] = new ButtonWidget(this, "Predictive.Button9", Common::convertToU32String("9 wxyz" ), nullptr, kBut9Cmd);
|
||||
_button[kButton0Act] = new ButtonWidget(this, "Predictive.Button0", Common::convertToU32String("0" ), nullptr, kBut0Cmd);
|
||||
}
|
||||
|
||||
// I18N: You must leave "#" as is, only word 'next' is translatable
|
||||
_button[kNextAct] = new ButtonWidget(this, "Predictive.Next", _("# next") , nullptr, kNextCmd);
|
||||
_button[kAddAct] = new ButtonWidget(this, "Predictive.Add", _("add") , nullptr, kAddCmd);
|
||||
_button[kNextAct] = new ButtonWidget(this, "Predictive.Next", Common::convertToU32String(_("# next")) , nullptr, kNextCmd);
|
||||
_button[kAddAct] = new ButtonWidget(this, "Predictive.Add", Common::convertToU32String(_("add")) , nullptr, kAddCmd);
|
||||
_button[kAddAct]->setEnabled(false);
|
||||
|
||||
#ifndef DISABLE_FANCY_THEMES
|
||||
@ -114,9 +114,9 @@ PredictiveDialog::PredictiveDialog() : Dialog("Predictive") {
|
||||
((PicButtonWidget *)_button[kDelAct])->setGfx(g_gui.theme()->getImageSurface(ThemeEngine::kImageDelButton));
|
||||
} else
|
||||
#endif
|
||||
_button[kDelAct] = new ButtonWidget(this, "Predictive.Delete" , _("<") , nullptr, kDelCmd);
|
||||
_button[kDelAct] = new ButtonWidget(this, "Predictive.Delete" , Common::convertToU32String(_("<")) , nullptr, kDelCmd);
|
||||
// I18N: Pre means 'Predictive', leave '*' as is
|
||||
_button[kModeAct] = new ButtonWidget(this, "Predictive.Pre", _("* Pre"), nullptr, kModeCmd);
|
||||
_button[kModeAct] = new ButtonWidget(this, "Predictive.Pre", Common::convertToU32String(_("* Pre")), nullptr, kModeCmd);
|
||||
_editText = new EditTextWidget(this, "Predictive.Word", _search, nullptr, 0, 0);
|
||||
|
||||
_userDictHasChanged = false;
|
||||
@ -190,7 +190,7 @@ void PredictiveDialog::reflowLayout() {
|
||||
((PicButtonWidget *)_button[kDelAct])->useThemeTransparency(true);
|
||||
((PicButtonWidget *)_button[kDelAct])->setGfx(g_gui.theme()->getImageSurface(ThemeEngine::kImageDelButton));
|
||||
} else {
|
||||
_button[kDelAct] = new ButtonWidget(this, "Predictive.Delete" , _("<") , nullptr, kDelCmd);
|
||||
_button[kDelAct] = new ButtonWidget(this, "Predictive.Delete" , Common::convertToU32String(_("<")) , nullptr, kDelCmd);
|
||||
}
|
||||
#endif
|
||||
|
||||
@ -603,13 +603,13 @@ void PredictiveDialog::processButton(ButtonId button) {
|
||||
if (_mode > kModeAbc) {
|
||||
_mode = kModePre;
|
||||
// I18N: Pre means 'Predictive', leave '*' as is
|
||||
_button[kModeAct]->setLabel(_("* Pre"));
|
||||
_button[kModeAct]->setLabel(Common::convertToU32String(_("* Pre")));
|
||||
} else if (_mode == kModeNum) {
|
||||
// I18N: 'Num' means Numbers
|
||||
_button[kModeAct]->setLabel(_("* Num"));
|
||||
_button[kModeAct]->setLabel(Common::convertToU32String(_("* Num")));
|
||||
} else {
|
||||
// I18N: 'Abc' means Latin alphabet input
|
||||
_button[kModeAct]->setLabel(_("* Abc"));
|
||||
_button[kModeAct]->setLabel(Common::convertToU32String(_("* Abc")));
|
||||
_button[kAddAct]->setEnabled(true);
|
||||
}
|
||||
|
||||
|
@ -46,19 +46,19 @@ RemoteBrowserDialog::RemoteBrowserDialog(const char *title):
|
||||
_workingRequest(nullptr), _ignoreCallback(false) {
|
||||
_backgroundType = GUI::ThemeEngine::kDialogBackgroundPlain;
|
||||
|
||||
new StaticTextWidget(this, "Browser.Headline", title);
|
||||
_currentPath = new StaticTextWidget(this, "Browser.Path", "DUMMY");
|
||||
new StaticTextWidget(this, "Browser.Headline", Common::convertToU32String(title));
|
||||
_currentPath = new StaticTextWidget(this, "Browser.Path", Common::convertToU32String("DUMMY"));
|
||||
|
||||
_fileList = new ListWidget(this, "Browser.List");
|
||||
_fileList->setNumberingMode(kListNumberingOff);
|
||||
_fileList->setEditable(false);
|
||||
|
||||
if (g_system->getOverlayWidth() > 320)
|
||||
new ButtonWidget(this, "Browser.Up", _("Go up"), _("Go to previous directory level"), kGoUpCmd);
|
||||
new ButtonWidget(this, "Browser.Up", Common::convertToU32String(_("Go up")), _("Go to previous directory level"), kGoUpCmd);
|
||||
else
|
||||
new ButtonWidget(this, "Browser.Up", _c("Go up", "lowres"), _("Go to previous directory level"), kGoUpCmd);
|
||||
new ButtonWidget(this, "Browser.Cancel", _("Cancel"), nullptr, kCloseCmd);
|
||||
new ButtonWidget(this, "Browser.Choose", _("Choose"), nullptr, kChooseCmd);
|
||||
new ButtonWidget(this, "Browser.Up", Common::convertToU32String(_c("Go up", "lowres")), _("Go to previous directory level"), kGoUpCmd);
|
||||
new ButtonWidget(this, "Browser.Cancel", Common::convertToU32String(_("Cancel")), nullptr, kCloseCmd);
|
||||
new ButtonWidget(this, "Browser.Choose", Common::convertToU32String(_("Choose")), nullptr, kChooseCmd);
|
||||
}
|
||||
|
||||
RemoteBrowserDialog::~RemoteBrowserDialog() {
|
||||
|
@ -49,7 +49,7 @@ enum {
|
||||
};
|
||||
|
||||
SaveLoadCloudSyncProgressDialog::SaveLoadCloudSyncProgressDialog(bool canRunInBackground): Dialog("SaveLoadCloudSyncProgress"), _close(false) {
|
||||
_label = new StaticTextWidget(this, "SaveLoadCloudSyncProgress.TitleText", "Downloading saves...");
|
||||
_label = new StaticTextWidget(this, "SaveLoadCloudSyncProgress.TitleText", Common::convertToU32String("Downloading saves..."));
|
||||
uint32 progress = (uint32)(100 * CloudMan.getSyncDownloadingProgress());
|
||||
_progressBar = new SliderWidget(this, "SaveLoadCloudSyncProgress.ProgressBar");
|
||||
_progressBar->setMinValue(0);
|
||||
@ -57,8 +57,8 @@ SaveLoadCloudSyncProgressDialog::SaveLoadCloudSyncProgressDialog(bool canRunInBa
|
||||
_progressBar->setValue(progress);
|
||||
_progressBar->setEnabled(false);
|
||||
_percentLabel = new StaticTextWidget(this, "SaveLoadCloudSyncProgress.PercentText", Common::String::format("%u %%", progress));
|
||||
new ButtonWidget(this, "SaveLoadCloudSyncProgress.Cancel", "Cancel", nullptr, kCancelSyncCmd, Common::ASCII_ESCAPE); // Cancel dialog
|
||||
ButtonWidget *backgroundButton = new ButtonWidget(this, "SaveLoadCloudSyncProgress.Background", "Run in background", nullptr, kBackgroundSyncCmd, Common::ASCII_RETURN); // Confirm dialog
|
||||
new ButtonWidget(this, "SaveLoadCloudSyncProgress.Cancel", Common::convertToU32String("Cancel"), nullptr, kCancelSyncCmd, Common::ASCII_ESCAPE); // Cancel dialog
|
||||
ButtonWidget *backgroundButton = new ButtonWidget(this, "SaveLoadCloudSyncProgress.Background", Common::convertToU32String("Run in background"), nullptr, kBackgroundSyncCmd, Common::ASCII_RETURN); // Confirm dialog
|
||||
backgroundButton->setEnabled(canRunInBackground);
|
||||
g_gui.scheduleTopDialogRedraw();
|
||||
}
|
||||
@ -358,7 +358,7 @@ ButtonWidget *SaveLoadChooserDialog::createSwitchButton(const Common::String &na
|
||||
((PicButtonWidget *)button)->setGfx(g_gui.theme()->getImageSurface(image));
|
||||
} else
|
||||
#endif
|
||||
button = new ButtonWidget(this, name, desc, tooltip, cmd);
|
||||
button = new ButtonWidget(this, name, Common::convertToU32String(desc), tooltip, cmd);
|
||||
|
||||
return button;
|
||||
}
|
||||
@ -385,16 +385,16 @@ SaveLoadChooserSimple::SaveLoadChooserSimple(const String &title, const String &
|
||||
|
||||
_gfxWidget = new GraphicsWidget(this, 0, 0, 10, 10);
|
||||
|
||||
_date = new StaticTextWidget(this, 0, 0, 10, 10, _("No date saved"), Graphics::kTextAlignCenter);
|
||||
_time = new StaticTextWidget(this, 0, 0, 10, 10, _("No time saved"), Graphics::kTextAlignCenter);
|
||||
_playtime = new StaticTextWidget(this, 0, 0, 10, 10, _("No playtime saved"), Graphics::kTextAlignCenter);
|
||||
_date = new StaticTextWidget(this, 0, 0, 10, 10, Common::convertToU32String(_("No date saved")), Graphics::kTextAlignCenter);
|
||||
_time = new StaticTextWidget(this, 0, 0, 10, 10, Common::convertToU32String(_("No time saved")), Graphics::kTextAlignCenter);
|
||||
_playtime = new StaticTextWidget(this, 0, 0, 10, 10, Common::convertToU32String(_("No playtime saved")), Graphics::kTextAlignCenter);
|
||||
|
||||
// Buttons
|
||||
new ButtonWidget(this, "SaveLoadChooser.Cancel", _("Cancel"), nullptr, kCloseCmd);
|
||||
_chooseButton = new ButtonWidget(this, "SaveLoadChooser.Choose", buttonLabel, nullptr, kChooseCmd);
|
||||
new ButtonWidget(this, "SaveLoadChooser.Cancel", Common::convertToU32String(_("Cancel")), nullptr, kCloseCmd);
|
||||
_chooseButton = new ButtonWidget(this, "SaveLoadChooser.Choose", Common::U32String(buttonLabel), nullptr, kChooseCmd);
|
||||
_chooseButton->setEnabled(false);
|
||||
|
||||
_deleteButton = new ButtonWidget(this, "SaveLoadChooser.Delete", _("Delete"), nullptr, kDelCmd);
|
||||
_deleteButton = new ButtonWidget(this, "SaveLoadChooser.Delete", Common::convertToU32String(_("Delete")), nullptr, kDelCmd);
|
||||
_deleteButton->setEnabled(false);
|
||||
|
||||
_delSupport = _metaInfoSupport = _thumbnailSupport = false;
|
||||
@ -564,9 +564,9 @@ void SaveLoadChooserSimple::updateSelection(bool redraw) {
|
||||
// We used to support letting the themes specify the fill color with our
|
||||
// initial theme based GUI. But this support was dropped.
|
||||
_gfxWidget->setGfx(-1, -1, 0, 0, 0);
|
||||
_date->setLabel(_("No date saved"));
|
||||
_time->setLabel(_("No time saved"));
|
||||
_playtime->setLabel(_("No playtime saved"));
|
||||
_date->setLabel(Common::convertToU32String(_("No date saved")));
|
||||
_time->setLabel(Common::convertToU32String(_("No time saved")));
|
||||
_playtime->setLabel(Common::convertToU32String(_("No playtime saved")));
|
||||
|
||||
if (selItem >= 0 && _metaInfoSupport) {
|
||||
SaveStateDescriptor desc = (_saveList[selItem].getLocked() ? _saveList[selItem] : _metaEngine->querySaveMetaInfos(_target.c_str(), _saveList[selItem].getSaveSlot()));
|
||||
@ -764,11 +764,11 @@ SaveLoadChooserGrid::SaveLoadChooserGrid(const Common::String &title, bool saveM
|
||||
list->setBackgroundType(ThemeEngine::kWidgetBackgroundNo);
|
||||
|
||||
// Buttons
|
||||
new ButtonWidget(this, "SaveLoadChooser.Delete", _("Cancel"), nullptr, kCloseCmd);
|
||||
_nextButton = new ButtonWidget(this, "SaveLoadChooser.Choose", _("Next"), nullptr, kNextCmd);
|
||||
new ButtonWidget(this, "SaveLoadChooser.Delete", Common::convertToU32String(_("Cancel")), nullptr, kCloseCmd);
|
||||
_nextButton = new ButtonWidget(this, "SaveLoadChooser.Choose", Common::convertToU32String(_("Next")), nullptr, kNextCmd);
|
||||
_nextButton->setEnabled(false);
|
||||
|
||||
_prevButton = new ButtonWidget(this, "SaveLoadChooser.Cancel", _("Prev"), nullptr, kPrevCmd);
|
||||
_prevButton = new ButtonWidget(this, "SaveLoadChooser.Cancel", Common::convertToU32String(_("Prev")), nullptr, kPrevCmd);
|
||||
_prevButton->setEnabled(false);
|
||||
|
||||
// Page display
|
||||
@ -975,7 +975,7 @@ void SaveLoadChooserGrid::reflowLayout() {
|
||||
// In the save mode we will always create a new save button as the first button.
|
||||
if (_saveMode && curLine == 0 && curColumn == 0) {
|
||||
_newSaveContainer = new ContainerWidget(this, curX, y, containerWidth, containerHeight);
|
||||
ButtonWidget *newSave = new ButtonWidget(_newSaveContainer, dstX, dstY, buttonWidth, buttonHeight, _("New Save"), _("Create a new saved game"), kNewSaveCmd);
|
||||
ButtonWidget *newSave = new ButtonWidget(_newSaveContainer, dstX, dstY, buttonWidth, buttonHeight, Common::convertToU32String(_("New Save")), _("Create a new saved game"), kNewSaveCmd);
|
||||
// In case no more slots are free, we will disable the new save button
|
||||
if (_nextFreeSaveSlot == -1) {
|
||||
newSave->setEnabled(false);
|
||||
@ -1162,8 +1162,8 @@ SavenameDialog::SavenameDialog()
|
||||
: Dialog("SavenameDialog") {
|
||||
_title = new StaticTextWidget(this, "SavenameDialog.DescriptionText", Common::String());
|
||||
|
||||
new ButtonWidget(this, "SavenameDialog.Cancel", _("Cancel"), nullptr, kCloseCmd);
|
||||
new ButtonWidget(this, "SavenameDialog.Ok", _("OK"), nullptr, kOKCmd);
|
||||
new ButtonWidget(this, "SavenameDialog.Cancel", Common::convertToU32String(_("Cancel")), nullptr, kCloseCmd);
|
||||
new ButtonWidget(this, "SavenameDialog.Ok", Common::convertToU32String(_("OK")), nullptr, kOKCmd);
|
||||
|
||||
_description = new EditTextWidget(this, "SavenameDialog.Description", Common::String(), nullptr, 0, kOKCmd);
|
||||
|
||||
|
@ -42,7 +42,7 @@ enum {
|
||||
ThemeBrowser::ThemeBrowser() : Dialog("Browser") {
|
||||
_fileList = nullptr;
|
||||
|
||||
new StaticTextWidget(this, "Browser.Headline", _("Select a Theme"));
|
||||
new StaticTextWidget(this, "Browser.Headline", Common::convertToU32String(_("Select a Theme")));
|
||||
|
||||
// Add file list
|
||||
_fileList = new ListWidget(this, "Browser.List");
|
||||
@ -52,8 +52,8 @@ ThemeBrowser::ThemeBrowser() : Dialog("Browser") {
|
||||
_backgroundType = GUI::ThemeEngine::kDialogBackgroundPlain;
|
||||
|
||||
// Buttons
|
||||
new ButtonWidget(this, "Browser.Cancel", _("Cancel"), nullptr, kCloseCmd);
|
||||
new ButtonWidget(this, "Browser.Choose", _("Choose"), nullptr, kChooseCmd);
|
||||
new ButtonWidget(this, "Browser.Cancel", Common::convertToU32String(_("Cancel")), nullptr, kCloseCmd);
|
||||
new ButtonWidget(this, "Browser.Choose", Common::convertToU32String(_("Choose")), nullptr, kChooseCmd);
|
||||
}
|
||||
|
||||
void ThemeBrowser::open() {
|
||||
|
@ -46,22 +46,22 @@ UnknownGameDialog::UnknownGameDialog(const DetectedGame &detectedGame) :
|
||||
_detectedGame(detectedGame) {
|
||||
|
||||
if (detectedGame.canBeAdded) {
|
||||
_addAnywayButton = new ButtonWidget(this, "UnknownGameDialog.Add", _("Add anyway"), nullptr, kAddAnyway);
|
||||
_addAnywayButton = new ButtonWidget(this, "UnknownGameDialog.Add", Common::convertToU32String(_("Add anyway")), nullptr, kAddAnyway);
|
||||
} else {
|
||||
_addAnywayButton = nullptr;
|
||||
}
|
||||
|
||||
_closeButton = new ButtonWidget(this, "UnknownGameDialog.Close", detectedGame.canBeAdded ? _("Cancel") : _("Close"), nullptr, kClose);
|
||||
_closeButton = new ButtonWidget(this, "UnknownGameDialog.Close", detectedGame.canBeAdded ? Common::convertToU32String(_("Cancel")) : Common::convertToU32String(_("Close")), nullptr, kClose);
|
||||
|
||||
//Check if we have clipboard functionality
|
||||
if (g_system->hasFeature(OSystem::kFeatureClipboardSupport)) {
|
||||
_copyToClipboardButton = new ButtonWidget(this, "UnknownGameDialog.Copy", _("Copy to clipboard"), nullptr, kCopyToClipboard);
|
||||
_copyToClipboardButton = new ButtonWidget(this, "UnknownGameDialog.Copy", Common::convertToU32String(_("Copy to clipboard")), nullptr, kCopyToClipboard);
|
||||
} else
|
||||
_copyToClipboardButton = nullptr;
|
||||
|
||||
//Check if we have support for opening URLs
|
||||
if (g_system->hasFeature(OSystem::kFeatureOpenUrl)) {
|
||||
_openBugTrackerUrlButton = new ButtonWidget(this, "UnknownGameDialog.Report", _("Report game"), nullptr, kOpenBugtrackerURL);
|
||||
_openBugTrackerUrlButton = new ButtonWidget(this, "UnknownGameDialog.Report", Common::convertToU32String(_("Report game")), nullptr, kOpenBugtrackerURL);
|
||||
} else
|
||||
_openBugTrackerUrlButton = nullptr;
|
||||
|
||||
|
@ -230,7 +230,7 @@ bool Widget::useRTL() const {
|
||||
return _useRTL;
|
||||
}
|
||||
|
||||
uint8 Widget::parseHotkey(const Common::String &label) {
|
||||
uint8 Widget::parseHotkey(const Common::U32String &label) {
|
||||
if (!label.contains('~'))
|
||||
return 0;
|
||||
|
||||
@ -267,14 +267,14 @@ uint8 Widget::parseHotkey(const Common::String &label) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
Common::String Widget::cleanupHotkey(const Common::String &label) {
|
||||
Common::U32String Widget::cleanupHotkey(const Common::U32String &label) {
|
||||
Common::String res;
|
||||
|
||||
for (uint i = 0; i < label.size(); i++)
|
||||
if (label[i] != '~')
|
||||
if (label[i] != '~')
|
||||
res = res + label[i];
|
||||
|
||||
return res;
|
||||
return Common::U32String(res);
|
||||
}
|
||||
|
||||
void Widget::read(Common::String str) {
|
||||
@ -291,8 +291,8 @@ void Widget::read(Common::String str) {
|
||||
|
||||
#pragma mark -
|
||||
|
||||
StaticTextWidget::StaticTextWidget(GuiObject *boss, int x, int y, int w, int h, const Common::String &text, Graphics::TextAlign align, const char *tooltip, ThemeEngine::FontStyle font)
|
||||
: Widget(boss, x, y, w, h, tooltip) {
|
||||
StaticTextWidget::StaticTextWidget(GuiObject *boss, int x, int y, int w, int h, const Common::U32String &text, Graphics::TextAlign align, const char *tooltip, ThemeEngine::FontStyle font)
|
||||
: Widget(boss, x, y, w, h, tooltip), _align(align) {
|
||||
setFlags(WIDGET_ENABLED);
|
||||
_type = kStaticTextWidget;
|
||||
_label = text;
|
||||
@ -300,7 +300,7 @@ StaticTextWidget::StaticTextWidget(GuiObject *boss, int x, int y, int w, int h,
|
||||
_align = Graphics::convertTextAlignH(align, g_gui.useRTL() && _useRTL);
|
||||
}
|
||||
|
||||
StaticTextWidget::StaticTextWidget(GuiObject *boss, const Common::String &name, const Common::String &text, const char *tooltip, ThemeEngine::FontStyle font)
|
||||
StaticTextWidget::StaticTextWidget(GuiObject *boss, const Common::String &name, const Common::U32String &text, const char *tooltip, ThemeEngine::FontStyle font)
|
||||
: Widget(boss, name, tooltip) {
|
||||
setFlags(WIDGET_ENABLED | WIDGET_CLEARBG);
|
||||
_type = kStaticTextWidget;
|
||||
@ -315,7 +315,7 @@ void StaticTextWidget::setValue(int value) {
|
||||
_label = Common::String::format("%d", value);
|
||||
}
|
||||
|
||||
void StaticTextWidget::setLabel(const Common::String &label) {
|
||||
void StaticTextWidget::setLabel(const Common::U32String &label) {
|
||||
if (_label != label) {
|
||||
_label = label;
|
||||
|
||||
@ -342,7 +342,7 @@ void StaticTextWidget::drawWidget() {
|
||||
|
||||
#pragma mark -
|
||||
|
||||
ButtonWidget::ButtonWidget(GuiObject *boss, int x, int y, int w, int h, const Common::String &label, const char *tooltip, uint32 cmd, uint8 hotkey)
|
||||
ButtonWidget::ButtonWidget(GuiObject *boss, int x, int y, int w, int h, const Common::U32String &label, const char *tooltip, uint32 cmd, uint8 hotkey)
|
||||
: StaticTextWidget(boss, x, y, w, h, cleanupHotkey(label), Graphics::kTextAlignCenter, tooltip), CommandSender(boss),
|
||||
_cmd(cmd), _hotkey(hotkey), _duringPress(false) {
|
||||
|
||||
@ -353,7 +353,7 @@ ButtonWidget::ButtonWidget(GuiObject *boss, int x, int y, int w, int h, const Co
|
||||
_type = kButtonWidget;
|
||||
}
|
||||
|
||||
ButtonWidget::ButtonWidget(GuiObject *boss, const Common::String &name, const Common::String &label, const char *tooltip, uint32 cmd, uint8 hotkey)
|
||||
ButtonWidget::ButtonWidget(GuiObject *boss, const Common::String &name, const Common::U32String &label, const char *tooltip, uint32 cmd, uint8 hotkey)
|
||||
: StaticTextWidget(boss, name, cleanupHotkey(label), tooltip), CommandSender(boss),
|
||||
_cmd(cmd), _hotkey(hotkey), _duringPress(false) {
|
||||
if (hotkey == 0)
|
||||
@ -386,7 +386,7 @@ void ButtonWidget::drawWidget() {
|
||||
g_gui.theme()->drawButton(Common::Rect(_x, _y, _x + _w, _y + _h), _label, _state, getFlags());
|
||||
}
|
||||
|
||||
void ButtonWidget::setLabel(const Common::String &label) {
|
||||
void ButtonWidget::setLabel(const Common::U32String &label) {
|
||||
StaticTextWidget::setLabel(cleanupHotkey(label));
|
||||
}
|
||||
|
||||
@ -404,9 +404,9 @@ ButtonWidget *addClearButton(GuiObject *boss, const Common::String &name, uint32
|
||||
} else
|
||||
#endif
|
||||
if (!name.empty())
|
||||
button = new ButtonWidget(boss, name, "C", _("Clear value"), cmd);
|
||||
button = new ButtonWidget(boss, name, Common::convertToU32String("C"), _("Clear value"), cmd);
|
||||
else
|
||||
button = new ButtonWidget(boss, x, y, w, h, "C", _("Clear value"), cmd);
|
||||
button = new ButtonWidget(boss, x, y, w, h, Common::convertToU32String("C"), _("Clear value"), cmd);
|
||||
|
||||
return button;
|
||||
}
|
||||
@ -429,14 +429,14 @@ void ButtonWidget::setUnpressedState() {
|
||||
|
||||
#pragma mark -
|
||||
|
||||
DropdownButtonWidget::DropdownButtonWidget(GuiObject *boss, int x, int y, int w, int h, const Common::String &label, const char *tooltip, uint32 cmd, uint8 hotkey) :
|
||||
DropdownButtonWidget::DropdownButtonWidget(GuiObject *boss, int x, int y, int w, int h, const Common::U32String &label, const char *tooltip, uint32 cmd, uint8 hotkey) :
|
||||
ButtonWidget(boss, x, y, w, h, label, tooltip, cmd, hotkey) {
|
||||
setFlags(getFlags() | WIDGET_TRACK_MOUSE);
|
||||
|
||||
reset();
|
||||
}
|
||||
|
||||
DropdownButtonWidget::DropdownButtonWidget(GuiObject *boss, const Common::String &name, const Common::String &label, const char *tooltip, uint32 cmd, uint8 hotkey) :
|
||||
DropdownButtonWidget::DropdownButtonWidget(GuiObject *boss, const Common::String &name, const Common::U32String &label, const char *tooltip, uint32 cmd, uint8 hotkey) :
|
||||
ButtonWidget(boss, name, label, tooltip, cmd, hotkey) {
|
||||
setFlags(getFlags() | WIDGET_TRACK_MOUSE);
|
||||
|
||||
@ -512,7 +512,7 @@ void DropdownButtonWidget::getMinSize(int &minWidth, int &minHeight) {
|
||||
}
|
||||
}
|
||||
|
||||
void DropdownButtonWidget::appendEntry(const Common::String &label, uint32 cmd) {
|
||||
void DropdownButtonWidget::appendEntry(const Common::U32String &label, uint32 cmd) {
|
||||
Entry e;
|
||||
e.label = label;
|
||||
e.cmd = cmd;
|
||||
@ -536,7 +536,7 @@ void DropdownButtonWidget::drawWidget() {
|
||||
#pragma mark -
|
||||
|
||||
PicButtonWidget::PicButtonWidget(GuiObject *boss, int x, int y, int w, int h, const char *tooltip, uint32 cmd, uint8 hotkey)
|
||||
: ButtonWidget(boss, x, y, w, h, "", tooltip, cmd, hotkey),
|
||||
: ButtonWidget(boss, x, y, w, h, Common::convertToU32String(""), tooltip, cmd, hotkey),
|
||||
_alpha(255), _transparency(false), _showButton(true) {
|
||||
|
||||
setFlags(WIDGET_ENABLED/* | WIDGET_BORDER*/ | WIDGET_CLEARBG);
|
||||
@ -544,7 +544,7 @@ PicButtonWidget::PicButtonWidget(GuiObject *boss, int x, int y, int w, int h, co
|
||||
}
|
||||
|
||||
PicButtonWidget::PicButtonWidget(GuiObject *boss, const Common::String &name, const char *tooltip, uint32 cmd, uint8 hotkey)
|
||||
: ButtonWidget(boss, name, "", tooltip, cmd, hotkey),
|
||||
: ButtonWidget(boss, name, Common::convertToU32String(""), tooltip, cmd, hotkey),
|
||||
_alpha(255), _transparency(false), _showButton(true) {
|
||||
setFlags(WIDGET_ENABLED/* | WIDGET_BORDER*/ | WIDGET_CLEARBG);
|
||||
_type = kButtonWidget;
|
||||
@ -584,7 +584,7 @@ void PicButtonWidget::setGfx(int w, int h, int r, int g, int b, int statenum) {
|
||||
|
||||
void PicButtonWidget::drawWidget() {
|
||||
if (_showButton)
|
||||
g_gui.theme()->drawButton(Common::Rect(_x, _y, _x + _w, _y + _h), "", _state, getFlags());
|
||||
g_gui.theme()->drawButton(Common::Rect(_x, _y, _x + _w, _y + _h), Common::convertToU32String(""), _state, getFlags());
|
||||
|
||||
Graphics::Surface *gfx;
|
||||
|
||||
@ -617,13 +617,13 @@ void PicButtonWidget::drawWidget() {
|
||||
|
||||
#pragma mark -
|
||||
|
||||
CheckboxWidget::CheckboxWidget(GuiObject *boss, int x, int y, int w, int h, const Common::String &label, const char *tooltip, uint32 cmd, uint8 hotkey)
|
||||
CheckboxWidget::CheckboxWidget(GuiObject *boss, int x, int y, int w, int h, const Common::U32String &label, const char *tooltip, uint32 cmd, uint8 hotkey)
|
||||
: ButtonWidget(boss, x, y, w, h, label, tooltip, cmd, hotkey), _state(false) {
|
||||
setFlags(WIDGET_ENABLED);
|
||||
_type = kCheckboxWidget;
|
||||
}
|
||||
|
||||
CheckboxWidget::CheckboxWidget(GuiObject *boss, const Common::String &name, const Common::String &label, const char *tooltip, uint32 cmd, uint8 hotkey)
|
||||
CheckboxWidget::CheckboxWidget(GuiObject *boss, const Common::String &name, const Common::U32String &label, const char *tooltip, uint32 cmd, uint8 hotkey)
|
||||
: ButtonWidget(boss, name, label, tooltip, cmd, hotkey), _state(false) {
|
||||
setFlags(WIDGET_ENABLED);
|
||||
_type = kCheckboxWidget;
|
||||
@ -679,14 +679,14 @@ void RadiobuttonGroup::setEnabled(bool ena) {
|
||||
|
||||
#pragma mark -
|
||||
|
||||
RadiobuttonWidget::RadiobuttonWidget(GuiObject *boss, int x, int y, int w, int h, RadiobuttonGroup *group, int value, const Common::String &label, const char *tooltip, uint8 hotkey)
|
||||
RadiobuttonWidget::RadiobuttonWidget(GuiObject *boss, int x, int y, int w, int h, RadiobuttonGroup *group, int value, const Common::U32String &label, const char *tooltip, uint8 hotkey)
|
||||
: ButtonWidget(boss, x, y, w, h, label, tooltip, 0, hotkey), _state(false), _value(value), _group(group) {
|
||||
setFlags(WIDGET_ENABLED);
|
||||
_type = kRadiobuttonWidget;
|
||||
_group->addButton(this);
|
||||
}
|
||||
|
||||
RadiobuttonWidget::RadiobuttonWidget(GuiObject *boss, const Common::String &name, RadiobuttonGroup *group, int value, const Common::String &label, const char *tooltip, uint8 hotkey)
|
||||
RadiobuttonWidget::RadiobuttonWidget(GuiObject *boss, const Common::String &name, RadiobuttonGroup *group, int value, const Common::U32String &label, const char *tooltip, uint8 hotkey)
|
||||
: ButtonWidget(boss, name, label, tooltip, 0, hotkey), _state(false), _value(value), _group(group) {
|
||||
setFlags(WIDGET_ENABLED);
|
||||
_type = kRadiobuttonWidget;
|
||||
|
38
gui/widget.h
38
gui/widget.h
@ -166,8 +166,8 @@ public:
|
||||
|
||||
bool useRTL() const;
|
||||
|
||||
uint8 parseHotkey(const Common::String &label);
|
||||
Common::String cleanupHotkey(const Common::String &label);
|
||||
uint8 parseHotkey(const Common::U32String &label);
|
||||
Common::U32String cleanupHotkey(const Common::U32String &label);
|
||||
|
||||
bool hasTooltip() const { return !_tooltip.empty(); }
|
||||
const Common::String &getTooltip() const { return _tooltip; }
|
||||
@ -196,19 +196,19 @@ protected:
|
||||
/* StaticTextWidget */
|
||||
class StaticTextWidget : public Widget {
|
||||
protected:
|
||||
Common::String _label;
|
||||
Common::U32String _label;
|
||||
Graphics::TextAlign _align;
|
||||
ThemeEngine::FontStyle _font;
|
||||
public:
|
||||
StaticTextWidget(GuiObject *boss, int x, int y, int w, int h, const Common::String &text, Graphics::TextAlign align, const char *tooltip = nullptr, ThemeEngine::FontStyle font = ThemeEngine::kFontStyleBold);
|
||||
StaticTextWidget(GuiObject *boss, const Common::String &name, const Common::String &text, const char *tooltip = nullptr, ThemeEngine::FontStyle font = ThemeEngine::kFontStyleBold);
|
||||
StaticTextWidget(GuiObject *boss, int x, int y, int w, int h, const Common::U32String &text, Graphics::TextAlign align, const char *tooltip = nullptr, ThemeEngine::FontStyle font = ThemeEngine::kFontStyleBold);
|
||||
StaticTextWidget(GuiObject *boss, const Common::String &name, const Common::U32String &text, const char *tooltip = nullptr, ThemeEngine::FontStyle font = ThemeEngine::kFontStyleBold);
|
||||
void setValue(int value);
|
||||
void setLabel(const Common::String &label);
|
||||
void setLabel(const Common::U32String &label);
|
||||
void handleMouseEntered(int button) override { readLabel(); }
|
||||
const Common::String &getLabel() const { return _label; }
|
||||
const Common::U32String &getLabel() const { return _label; }
|
||||
void setAlign(Graphics::TextAlign align);
|
||||
Graphics::TextAlign getAlign() const { return _align; }
|
||||
void readLabel() { read(_label); }
|
||||
void readLabel() { read(Common::convertFromU32String(_label)); }
|
||||
|
||||
protected:
|
||||
void drawWidget() override;
|
||||
@ -221,15 +221,15 @@ protected:
|
||||
uint32 _cmd;
|
||||
uint8 _hotkey;
|
||||
public:
|
||||
ButtonWidget(GuiObject *boss, int x, int y, int w, int h, const Common::String &label, const char *tooltip = nullptr, uint32 cmd = 0, uint8 hotkey = 0);
|
||||
ButtonWidget(GuiObject *boss, const Common::String &name, const Common::String &label, const char *tooltip = nullptr, uint32 cmd = 0, uint8 hotkey = 0);
|
||||
ButtonWidget(GuiObject *boss, int x, int y, int w, int h, const Common::U32String &label, const char *tooltip = nullptr, uint32 cmd = 0, uint8 hotkey = 0);
|
||||
ButtonWidget(GuiObject *boss, const Common::String &name, const Common::U32String &label, const char *tooltip = nullptr, uint32 cmd = 0, uint8 hotkey = 0);
|
||||
|
||||
void getMinSize(int &minWidth, int &minHeight) override;
|
||||
|
||||
void setCmd(uint32 cmd) { _cmd = cmd; }
|
||||
uint32 getCmd() const { return _cmd; }
|
||||
|
||||
void setLabel(const Common::String &label);
|
||||
void setLabel(const Common::U32String &label);
|
||||
|
||||
void handleMouseUp(int x, int y, int button, int clickCount) override;
|
||||
void handleMouseDown(int x, int y, int button, int clickCount) override;
|
||||
@ -247,8 +247,8 @@ protected:
|
||||
/* DropdownButtonWidget */
|
||||
class DropdownButtonWidget : public ButtonWidget {
|
||||
public:
|
||||
DropdownButtonWidget(GuiObject *boss, int x, int y, int w, int h, const Common::String &label, const char *tooltip = nullptr, uint32 cmd = 0, uint8 hotkey = 0);
|
||||
DropdownButtonWidget(GuiObject *boss, const Common::String &name, const Common::String &label, const char *tooltip = nullptr, uint32 cmd = 0, uint8 hotkey = 0);
|
||||
DropdownButtonWidget(GuiObject *boss, int x, int y, int w, int h, const Common::U32String &label, const char *tooltip = nullptr, uint32 cmd = 0, uint8 hotkey = 0);
|
||||
DropdownButtonWidget(GuiObject *boss, const Common::String &name, const Common::U32String &label, const char *tooltip = nullptr, uint32 cmd = 0, uint8 hotkey = 0);
|
||||
|
||||
void handleMouseMoved(int x, int y, int button) override;
|
||||
void handleMouseUp(int x, int y, int button, int clickCount) override;
|
||||
@ -256,12 +256,12 @@ public:
|
||||
void getMinSize(int &minWidth, int &minHeight) override;
|
||||
|
||||
|
||||
void appendEntry(const Common::String &label, uint32 cmd);
|
||||
void appendEntry(const Common::U32String &label, uint32 cmd);
|
||||
void clearEntries();
|
||||
|
||||
protected:
|
||||
struct Entry {
|
||||
Common::String label;
|
||||
Common::U32String label;
|
||||
uint32 cmd;
|
||||
};
|
||||
typedef Common::Array<Entry> EntryList;
|
||||
@ -307,8 +307,8 @@ class CheckboxWidget : public ButtonWidget {
|
||||
protected:
|
||||
bool _state;
|
||||
public:
|
||||
CheckboxWidget(GuiObject *boss, int x, int y, int w, int h, const Common::String &label, const char *tooltip = nullptr, uint32 cmd = 0, uint8 hotkey = 0);
|
||||
CheckboxWidget(GuiObject *boss, const Common::String &name, const Common::String &label, const char *tooltip = nullptr, uint32 cmd = 0, uint8 hotkey = 0);
|
||||
CheckboxWidget(GuiObject *boss, int x, int y, int w, int h, const Common::U32String &label, const char *tooltip = nullptr, uint32 cmd = 0, uint8 hotkey = 0);
|
||||
CheckboxWidget(GuiObject *boss, const Common::String &name, const Common::U32String &label, const char *tooltip = nullptr, uint32 cmd = 0, uint8 hotkey = 0);
|
||||
|
||||
void handleMouseUp(int x, int y, int button, int clickCount) override;
|
||||
void handleMouseEntered(int button) override { readLabel(); setFlags(WIDGET_HILITED); markAsDirty(); }
|
||||
@ -353,8 +353,8 @@ protected:
|
||||
int _value;
|
||||
|
||||
public:
|
||||
RadiobuttonWidget(GuiObject *boss, int x, int y, int w, int h, RadiobuttonGroup *group, int value, const Common::String &label, const char *tooltip = nullptr, uint8 hotkey = 0);
|
||||
RadiobuttonWidget(GuiObject *boss, const Common::String &name, RadiobuttonGroup *group, int value, const Common::String &label, const char *tooltip = nullptr, uint8 hotkey = 0);
|
||||
RadiobuttonWidget(GuiObject *boss, int x, int y, int w, int h, RadiobuttonGroup *group, int value, const Common::U32String &label, const char *tooltip = nullptr, uint8 hotkey = 0);
|
||||
RadiobuttonWidget(GuiObject *boss, const Common::String &name, RadiobuttonGroup *group, int value, const Common::U32String &label, const char *tooltip = nullptr, uint8 hotkey = 0);
|
||||
|
||||
void handleMouseUp(int x, int y, int button, int clickCount) override;
|
||||
void handleMouseEntered(int button) override { readLabel(); setFlags(WIDGET_HILITED); markAsDirty(); }
|
||||
|
@ -84,7 +84,7 @@ void PopUpDialog::open() {
|
||||
_w = 0;
|
||||
|
||||
for (uint i = 0; i < _entries.size(); i++) {
|
||||
int width = g_gui.getStringWidth(_entries[i]);
|
||||
int width = g_gui.getStringWidth(Common::convertFromU32String(_entries[i]));
|
||||
|
||||
if (width > _w)
|
||||
_w = width;
|
||||
@ -190,7 +190,7 @@ void PopUpDialog::handleMouseMoved(int x, int y, int button) {
|
||||
// ...and update the selection accordingly
|
||||
setSelection(item);
|
||||
if (_lastRead != item && _entries.size() > 0 && item != -1) {
|
||||
read(_entries[item]);
|
||||
read(Common::convertFromU32String(_entries[item]));
|
||||
_lastRead = item;
|
||||
}
|
||||
}
|
||||
@ -288,7 +288,7 @@ void PopUpDialog::setWidth(uint16 width) {
|
||||
_w = width;
|
||||
}
|
||||
|
||||
void PopUpDialog::appendEntry(const Common::String &entry) {
|
||||
void PopUpDialog::appendEntry(const Common::U32String &entry) {
|
||||
_entries.push_back(entry);
|
||||
}
|
||||
|
||||
@ -390,7 +390,7 @@ void PopUpDialog::drawMenuEntry(int entry, bool hilite) {
|
||||
w = _w - 2;
|
||||
}
|
||||
|
||||
Common::String &name(_entries[entry]);
|
||||
Common::U32String &name(_entries[entry]);
|
||||
|
||||
Common::Rect r1(x, y, x + w, y + _lineHeight);
|
||||
Common::Rect r2(x + 1, y + 2, x + w, y + 2 + _lineHeight);
|
||||
@ -496,7 +496,7 @@ void PopUpWidget::reflowLayout() {
|
||||
Widget::reflowLayout();
|
||||
}
|
||||
|
||||
void PopUpWidget::appendEntry(const String &entry, uint32 tag) {
|
||||
void PopUpWidget::appendEntry(const U32String &entry, uint32 tag) {
|
||||
Entry e;
|
||||
e.name = entry;
|
||||
e.tag = tag;
|
||||
@ -529,7 +529,7 @@ void PopUpWidget::setSelectedTag(uint32 tag) {
|
||||
}
|
||||
|
||||
void PopUpWidget::drawWidget() {
|
||||
Common::String sel;
|
||||
Common::U32String sel;
|
||||
if (_selectedItem >= 0)
|
||||
sel = _entries[_selectedItem].name;
|
||||
|
||||
|
@ -43,10 +43,11 @@ enum {
|
||||
*/
|
||||
class PopUpWidget : public Widget, public CommandSender {
|
||||
typedef Common::String String;
|
||||
typedef Common::U32String U32String;
|
||||
|
||||
struct Entry {
|
||||
String name;
|
||||
uint32 tag;
|
||||
U32String name;
|
||||
uint32 tag;
|
||||
};
|
||||
typedef Common::Array<Entry> EntryList;
|
||||
protected:
|
||||
@ -63,7 +64,7 @@ public:
|
||||
void handleMouseDown(int x, int y, int button, int clickCount) override;
|
||||
void handleMouseWheel(int x, int y, int direction) override;
|
||||
|
||||
void appendEntry(const String &entry, uint32 tag = (uint32)-1);
|
||||
void appendEntry(const U32String &entry, uint32 tag = (uint32)-1);
|
||||
void clearEntries();
|
||||
int numEntries() { return _entries.size(); }
|
||||
|
||||
@ -77,7 +78,7 @@ public:
|
||||
uint32 getSelectedTag() const { return (_selectedItem >= 0) ? _entries[_selectedItem].tag : (uint32)-1; }
|
||||
// const String& getSelectedString() const { return (_selectedItem >= 0) ? _entries[_selectedItem].name : String::emptyString; }
|
||||
|
||||
void handleMouseEntered(int button) override { if (_selectedItem != -1) read(_entries[_selectedItem].name); setFlags(WIDGET_HILITED); markAsDirty(); }
|
||||
void handleMouseEntered(int button) override { if (_selectedItem != -1) read(Common::convertFromU32String(_entries[_selectedItem].name)); setFlags(WIDGET_HILITED); markAsDirty(); }
|
||||
void handleMouseLeft(int button) override { clearFlags(WIDGET_HILITED); markAsDirty(); }
|
||||
|
||||
void reflowLayout() override;
|
||||
@ -106,7 +107,7 @@ protected:
|
||||
|
||||
int _lastRead;
|
||||
|
||||
typedef Common::Array<Common::String> EntryList;
|
||||
typedef Common::Array<Common::U32String> EntryList;
|
||||
EntryList _entries;
|
||||
|
||||
public:
|
||||
@ -127,7 +128,7 @@ public:
|
||||
void setLineHeight(int lineHeight);
|
||||
void setWidth(uint16 width);
|
||||
|
||||
void appendEntry(const Common::String &entry);
|
||||
void appendEntry(const Common::U32String &entry);
|
||||
void clearEntries();
|
||||
void setSelection(int item);
|
||||
|
||||
|
@ -73,8 +73,8 @@ void TabWidget::init() {
|
||||
String leftArrow = g_gui.useRTL() ? ">" : "<";
|
||||
String rightArrow = g_gui.useRTL() ? "<" : ">";
|
||||
|
||||
_navLeft = new ButtonWidget(this, x, y, _butW, _butH, leftArrow, nullptr, kCmdLeft);
|
||||
_navRight = new ButtonWidget(this, x + _butW + 2, y, _butW, _butH, rightArrow, nullptr, kCmdRight);
|
||||
_navLeft = new ButtonWidget(this, x, y, _butW, _butH, Common::convertToU32String(leftArrow), nullptr, kCmdLeft);
|
||||
_navRight = new ButtonWidget(this, x + _butW + 2, y, _butW, _butH, Common::convertToU32String(rightArrow), nullptr, kCmdRight);
|
||||
|
||||
_navLeft->setEnabled(false);
|
||||
_navRight->setEnabled(true);
|
||||
@ -112,7 +112,7 @@ uint16 TabWidget::getHeight() const {
|
||||
return _h + _tabHeight;
|
||||
}
|
||||
|
||||
int TabWidget::addTab(const String &title, const String &dialogName) {
|
||||
int TabWidget::addTab(const U32String &title, const String &dialogName) {
|
||||
// Add a new tab page
|
||||
Tab newTab;
|
||||
newTab.title = title;
|
||||
@ -120,7 +120,7 @@ int TabWidget::addTab(const String &title, const String &dialogName) {
|
||||
newTab.firstWidget = nullptr;
|
||||
|
||||
// Determine the new tab width
|
||||
int newWidth = g_gui.getStringWidth(title) + kTabTitleSpacing;
|
||||
int newWidth = g_gui.getStringWidth(Common::convertFromU32String(title)) + kTabTitleSpacing;
|
||||
if (newWidth < _minTabWidth)
|
||||
newWidth = _minTabWidth;
|
||||
newTab._tabWidth = newWidth;
|
||||
@ -260,7 +260,7 @@ void TabWidget::handleMouseMoved(int x, int y, int button) {
|
||||
|
||||
if (tabID <= _lastVisibleTab) {
|
||||
if (tabID != _lastRead) {
|
||||
read(_tabs[tabID].title);
|
||||
read(Common::convertFromU32String(_tabs[tabID].title));
|
||||
_lastRead = tabID;
|
||||
}
|
||||
}
|
||||
@ -350,7 +350,7 @@ void TabWidget::reflowLayout() {
|
||||
|
||||
for (uint i = 0; i < _tabs.size(); ++i) {
|
||||
// Determine the new tab width
|
||||
int newWidth = g_gui.getStringWidth(_tabs[i].title) + kTabTitleSpacing;
|
||||
int newWidth = g_gui.getStringWidth(Common::convertFromU32String(_tabs[i].title)) + kTabTitleSpacing;
|
||||
if (newWidth < _minTabWidth)
|
||||
newWidth = _minTabWidth;
|
||||
_tabs[i]._tabWidth = newWidth;
|
||||
@ -384,7 +384,7 @@ void TabWidget::reflowLayout() {
|
||||
}
|
||||
|
||||
void TabWidget::drawWidget() {
|
||||
Common::Array<Common::String> tabs;
|
||||
Common::Array<Common::U32String> tabs;
|
||||
Common::Array<int> widths;
|
||||
for (int i = _firstVisibleTab; i <= _lastVisibleTab; ++i) {
|
||||
tabs.push_back(_tabs[i].title);
|
||||
|
@ -36,8 +36,10 @@ enum {
|
||||
|
||||
class TabWidget : public Widget {
|
||||
typedef Common::String String;
|
||||
typedef Common::U32String U32String;
|
||||
|
||||
struct Tab {
|
||||
String title;
|
||||
U32String title;
|
||||
String dialogName;
|
||||
Widget *firstWidget;
|
||||
int _tabWidth;
|
||||
@ -74,7 +76,7 @@ public:
|
||||
* Add a new tab with the given title. Returns a unique ID which can be used
|
||||
* to identify the tab (to remove it / activate it etc.).
|
||||
*/
|
||||
int addTab(const String &title, const String &dialogName);
|
||||
int addTab(const U32String &title, const String &dialogName);
|
||||
|
||||
/**
|
||||
* Remove the tab with the given tab ID. Disposes all child widgets of that tab.
|
||||
@ -98,7 +100,7 @@ public:
|
||||
*/
|
||||
void setActiveTab(int tabID);
|
||||
|
||||
void setTabTitle(int tabID, const String &title) {
|
||||
void setTabTitle(int tabID, const U32String &title) {
|
||||
assert(0 <= tabID && tabID < (int)_tabs.size());
|
||||
_tabs[tabID].title = title;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user