[Scummvm-cvs-logs] SF.net SVN: scummvm:[54237] scummvm/trunk/engines/dialogs.cpp

criezy at users.sourceforge.net criezy at users.sourceforge.net
Sun Nov 14 22:10:57 CET 2010


Revision: 54237
          http://scummvm.svn.sourceforge.net/scummvm/?rev=54237&view=rev
Author:   criezy
Date:     2010-11-14 21:10:56 +0000 (Sun, 14 Nov 2010)

Log Message:
-----------
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.

Modified Paths:
--------------
    scummvm/trunk/engines/dialogs.cpp

Modified: scummvm/trunk/engines/dialogs.cpp
===================================================================
--- scummvm/trunk/engines/dialogs.cpp	2010-11-14 00:35:13 UTC (rev 54236)
+++ scummvm/trunk/engines/dialogs.cpp	2010-11-14 21:10:56 UTC (rev 54237)
@@ -176,6 +176,15 @@
 		_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()) {


This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.




More information about the Scummvm-git-logs mailing list