diff options
author | Thierry Crozat | 2010-11-14 21:10:56 +0000 |
---|---|---|
committer | Thierry Crozat | 2010-11-14 21:10:56 +0000 |
commit | 2b33642d5482fbd7109082df08f4c6d67ff8c188 (patch) | |
tree | 0ea3935497c3bb9c1701a3d7d2657fc615151ffd /engines | |
parent | db24b2a01415627ac540bf96e54902de2956b12b (diff) | |
download | scummvm-rg350-2b33642d5482fbd7109082df08f4c6d67ff8c188.tar.gz scummvm-rg350-2b33642d5482fbd7109082df08f4c6d67ff8c188.tar.bz2 scummvm-rg350-2b33642d5482fbd7109082df08f4c6d67ff8c188.zip |
GUI: Fix GMM labels translation for SCUMM engine
In the SCUMM engine (and maybe other engines), the GMM Dialog is created
in the engine constructor and before the window resolution is updated (so it is
still using the resolution from the Launcher). Therefore if the global scaler is x2
but a SCUMM game overwrite it to use x1, it was not using the correct labels
when they had a different translation for the lowres context.
svn-id: r54237
Diffstat (limited to 'engines')
-rw-r--r-- | engines/dialogs.cpp | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/engines/dialogs.cpp b/engines/dialogs.cpp index a8f9327152..9104eaff3a 100644 --- a/engines/dialogs.cpp +++ b/engines/dialogs.cpp @@ -176,6 +176,15 @@ void MainMenuDialog::reflowLayout() { _loadButton->setEnabled(_engine->canLoadGameStateCurrently()); if (_engine->hasFeature(Engine::kSupportsSavingDuringRuntime)) _saveButton->setEnabled(_engine->canSaveGameStateCurrently()); + + // Overlay size might have changed since the construction of the dialog. + // 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_system->getOverlayWidth() > 320) + _rtlButton->setLabel(_rtlButton->cleanupHotkey(_("~R~eturn to Launcher"))); + else + _rtlButton->setLabel(_rtlButton->cleanupHotkey(_c("~R~eturn to Launcher", "lowres"))); #ifndef DISABLE_FANCY_THEMES if (g_gui.xmlEval()->getVar("Globals.ShowGlobalMenuLogo", 0) == 1 && g_gui.theme()->supportsImages()) { |