[Scummvm-cvs-logs] CVS: scummvm/gui ThemeNew.cpp,1.14,1.15

Torbjörn Andersson eriktorbjorn at users.sourceforge.net
Tue Jan 31 00:42:23 CET 2006


Update of /cvsroot/scummvm/scummvm/gui
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv1101

Modified Files:
	ThemeNew.cpp 
Log Message:
I didn't realize that disabled widgets were transparent, rather than just
faded. In those cases, I guess the background should be restored before
drawing. But that can probably be done in the drawSurface / drawRect
functions instead, like this.


Index: ThemeNew.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/gui/ThemeNew.cpp,v
retrieving revision 1.14
retrieving revision 1.15
diff -u -d -r1.14 -r1.15
--- ThemeNew.cpp	31 Jan 2006 08:03:21 -0000	1.14
+++ ThemeNew.cpp	31 Jan 2006 08:41:51 -0000	1.15
@@ -656,6 +656,9 @@
 	int specialHeight = 0;
 	int specialWidth = 0;
 
+	if (alpha != 256)
+		restoreBackground(r);
+
 	if (drawHeight*2 > r.height()) {
 		drawHeight = r.height() / 2;
 		partsH = 2;
@@ -747,6 +750,9 @@
 
 	const OverlayColor transparency = _colors[kColorTransparency];
 
+	if (alpha != 256)
+		restoreBackground(r);
+
 	if (upDown && !leftRight) {	// upsidedown
 		src = (const OverlayColor*)surf->pixels + (surf->h - 1) * surf->w;
 		int drawWidth = (r.width() < surf->w) ? r.width() : surf->w;





More information about the Scummvm-git-logs mailing list