diff --git a/engines/dialogs.cpp b/engines/dialogs.cpp index 552ad275f5f..b73b361e384 100644 --- a/engines/dialogs.cpp +++ b/engines/dialogs.cpp @@ -89,7 +89,7 @@ MainMenuDialog::MainMenuDialog(Engine *engine) new GUI::ButtonWidget(this, "GlobalMenu.About", _("~A~bout"), Common::U32String(), kAboutCmd); - if (g_gui.getBaseWidth() > 320) + if (g_gui.getGUIWidth() > 320) _returnToLauncherButton = new GUI::ButtonWidget(this, "GlobalMenu.ReturnToLauncher", _("~R~eturn to Launcher"), Common::U32String(), kLauncherCmd); else _returnToLauncherButton = new GUI::ButtonWidget(this, "GlobalMenu.ReturnToLauncher", _c("~R~eturn to Launcher", "lowres"), Common::U32String(), kLauncherCmd); @@ -165,7 +165,7 @@ void MainMenuDialog::reflowLayout() { // Update labels when it might be needed // FIXME: it might be better to declare GUI::StaticTextWidget::setLabel() virtual // and to reimplement it in GUI::ButtonWidget to handle the hotkey. - if (g_gui.getBaseWidth() > 320) + if (g_gui.getGUIWidth() > 320) _returnToLauncherButton->setLabel(_returnToLauncherButton->cleanupHotkey(_("~R~eturn to Launcher"))); else _returnToLauncherButton->setLabel(_returnToLauncherButton->cleanupHotkey(_c("~R~eturn to Launcher", "lowres"))); diff --git a/gui/ThemeLayout.cpp b/gui/ThemeLayout.cpp index e43956025c6..3d38a7d8abb 100644 --- a/gui/ThemeLayout.cpp +++ b/gui/ThemeLayout.cpp @@ -225,13 +225,13 @@ void ThemeLayoutMain::reflowLayout(Widget *widgetChain) { if (_overlays == "screen") { _x = 0; _y = 0; - _w = g_gui.getBaseWidth() * g_gui.getScaleFactor(); - _h = g_gui.getBaseHeight() * g_gui.getScaleFactor(); + _w = g_gui.getGUIWidth() * g_gui.getScaleFactor(); + _h = g_gui.getGUIHeight() * g_gui.getScaleFactor(); } else if (_overlays == "screen_center") { _x = -1; _y = -1; - _w = _defaultW > 0 ? MIN(_defaultW, g_gui.getBaseWidth()) * g_gui.getScaleFactor() : -1; - _h = _defaultH > 0 ? MIN(_defaultH, g_gui.getBaseHeight()) * g_gui.getScaleFactor() : -1; + _w = _defaultW > 0 ? MIN(_defaultW, g_gui.getGUIWidth()) * g_gui.getScaleFactor() : -1; + _h = _defaultH > 0 ? MIN(_defaultH, g_gui.getGUIHeight()) * g_gui.getScaleFactor() : -1; } else { if (!g_gui.xmlEval()->getWidgetData(_overlays, _x, _y, _w, _h)) { warning("Unable to retrieve overlayed dialog position %s", _overlays.c_str()); @@ -239,10 +239,10 @@ void ThemeLayoutMain::reflowLayout(Widget *widgetChain) { if (_w == -1 || _h == -1) { warning("The overlayed dialog %s has not been sized, using a default size for %s", _overlays.c_str(), _name.c_str()); - _x = g_gui.getBaseWidth() / 10 * g_gui.getScaleFactor(); - _y = g_gui.getBaseHeight() / 10 * g_gui.getScaleFactor(); - _w = g_gui.getBaseWidth() * 8 / 10 * g_gui.getScaleFactor(); - _h = g_gui.getBaseHeight() * 8 / 10 * g_gui.getScaleFactor(); + _x = g_gui.getGUIWidth() / 10 * g_gui.getScaleFactor(); + _y = g_gui.getGUIHeight() / 10 * g_gui.getScaleFactor(); + _w = g_gui.getGUIWidth() * 8 / 10 * g_gui.getScaleFactor(); + _h = g_gui.getGUIHeight() * 8 / 10 * g_gui.getScaleFactor(); } } @@ -254,7 +254,7 @@ void ThemeLayoutMain::reflowLayout(Widget *widgetChain) { add them here and in Widget::draw() to enable RTL support for that particular dialog */ int oldX = _x; - _x = g_gui.getBaseWidth() * g_gui.getScaleFactor() - _w - _x; + _x = g_gui.getGUIWidth() * g_gui.getScaleFactor() - _w - _x; g_gui.setDialogPaddings(oldX, _x); } } diff --git a/gui/gui-manager.h b/gui/gui-manager.h index 0fc47734f7f..f4cc7747f5f 100644 --- a/gui/gui-manager.h +++ b/gui/gui-manager.h @@ -91,8 +91,8 @@ public: ThemeEval *xmlEval() { return _theme->getEvaluator(); } - int16 getBaseWidth() const { return _baseWidth; } - int16 getBaseHeight() const { return _baseHeight; } + int16 getGUIWidth() const { return _baseWidth; } + int16 getGUIHeight() const { return _baseHeight; } float getScaleFactor() const { return _scaleFactor; } bool useRTL() const { return _useRTL; } diff --git a/gui/saveload-dialog.cpp b/gui/saveload-dialog.cpp index 0c2d084174a..55377591937 100644 --- a/gui/saveload-dialog.cpp +++ b/gui/saveload-dialog.cpp @@ -113,7 +113,7 @@ SaveLoadChooserType getRequestedSaveLoadDialog(const MetaEngine *metaEngine) { // possible to use it. g_gui.checkScreenChange(); - if (g_gui.getBaseWidth() >= 640 && g_gui.getBaseHeight() >= 400 + if (g_gui.getGUIWidth() >= 640 && g_gui.getGUIHeight() >= 400 && metaEngine->hasFeature(MetaEngine::kSavesSupportMetaInfo) && metaEngine->hasFeature(MetaEngine::kSavesSupportThumbnail) && userConfig.equalsIgnoreCase("grid")) { @@ -342,7 +342,7 @@ void SaveLoadChooserDialog::addChooserButtons() { _listButton = createSwitchButton("SaveLoadChooser.ListSwitch", Common::U32String("L"), _("List view"), ThemeEngine::kImageList, kListSwitchCmd); _gridButton = createSwitchButton("SaveLoadChooser.GridSwitch", Common::U32String("G"), _("Grid view"), ThemeEngine::kImageGrid, kGridSwitchCmd); - if (!_metaInfoSupport || !_thumbnailSupport || !(g_gui.getBaseWidth() >= 640 && g_gui.getBaseHeight() >= 400)) { + if (!_metaInfoSupport || !_thumbnailSupport || !(g_gui.getGUIWidth() >= 640 && g_gui.getGUIHeight() >= 400)) { _gridButton->setEnabled(false); _listButton->setEnabled(false); }