[Scummvm-cvs-logs] SF.net SVN: scummvm: [21953] scummvm/trunk/gui

lordhoto at users.sourceforge.net lordhoto at users.sourceforge.net
Sun Apr 16 13:35:00 CEST 2006


Revision: 21953
Author:   lordhoto
Date:     2006-04-16 13:33:52 -0700 (Sun, 16 Apr 2006)
ViewCVS:  http://svn.sourceforge.net/scummvm/?rev=21953&view=rev

Log Message:
-----------
This should fix wrong colors of the scummvm logo in the new theme after screen change.

Modified Paths:
--------------
    scummvm/trunk/gui/dialog.h
    scummvm/trunk/gui/launcher.cpp
    scummvm/trunk/gui/launcher.h
    scummvm/trunk/gui/newgui.cpp
Modified: scummvm/trunk/gui/dialog.h
===================================================================
--- scummvm/trunk/gui/dialog.h	2006-04-16 19:54:39 UTC (rev 21952)
+++ scummvm/trunk/gui/dialog.h	2006-04-16 20:33:52 UTC (rev 21953)
@@ -76,7 +76,7 @@
 	virtual void handleKeyUp(uint16 ascii, int keycode, int modifiers);
 	virtual void handleMouseMoved(int x, int y, int button);
 	virtual void handleCommand(CommandSender *sender, uint32 cmd, uint32 data);
-	void handleScreenChanged();
+	virtual void handleScreenChanged();
 
 	Widget *findWidget(int x, int y); // Find the widget at pos x,y if any
 

Modified: scummvm/trunk/gui/launcher.cpp
===================================================================
--- scummvm/trunk/gui/launcher.cpp	2006-04-16 19:54:39 UTC (rev 21952)
+++ scummvm/trunk/gui/launcher.cpp	2006-04-16 20:33:52 UTC (rev 21953)
@@ -763,4 +763,19 @@
 	}
 }
 
+void LauncherDialog::handleScreenChanged() {
+#ifndef DISABLE_FANCY_THEMES
+	if (g_gui.evaluator()->getVar("launcher_logo.visible") == 1) {
+		GraphicsWidget *logo = new GraphicsWidget(this, "launcher_logo");
+		ThemeNew *th = (ThemeNew *)g_gui.theme();
+		logo->useTransparency(true);
+
+		logo->setGfx(th->getImageSurface(th->kThemeLogo));
+
+		new StaticTextWidget(this, "launcher_version", gScummVMVersionDate);
+	}
+#endif
+	Dialog::handleScreenChanged();
+}
+
 } // End of namespace GUI

Modified: scummvm/trunk/gui/launcher.h
===================================================================
--- scummvm/trunk/gui/launcher.h	2006-04-16 19:54:39 UTC (rev 21952)
+++ scummvm/trunk/gui/launcher.h	2006-04-16 20:33:52 UTC (rev 21953)
@@ -50,6 +50,8 @@
 	GameDetector 	&_detector;
 	BrowserDialog	*_browser;
 
+	virtual void handleScreenChanged();
+
 	void updateListing();
 	void updateButtons();
 

Modified: scummvm/trunk/gui/newgui.cpp
===================================================================
--- scummvm/trunk/gui/newgui.cpp	2006-04-16 19:54:39 UTC (rev 21952)
+++ scummvm/trunk/gui/newgui.cpp	2006-04-16 20:33:52 UTC (rev 21953)
@@ -235,7 +235,10 @@
 				// reinit the whole theme
 				_theme->refresh();
 				_needRedraw = true;
-				activeDialog->handleScreenChanged();
+				// refresh all dialogs
+				for (i = 0; i < _dialogStack.size(); ++i) {
+					activeDialog->handleScreenChanged();
+				}
 				break;
 			}
 		}


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