[Scummvm-cvs-logs] CVS: scummvm/gui theme.cpp,1.4,1.5

Torbjörn Andersson eriktorbjorn at users.sourceforge.net
Tue Jan 31 06:39:05 CET 2006


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

Modified Files:
	theme.cpp 
Log Message:
Make the old theme's checkboxes look a bit more like they used to. (Not
quite, though, as they are a bit smaller than they used to be.)


Index: theme.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/gui/theme.cpp,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -d -r1.4 -r1.5
--- theme.cpp	28 Jan 2006 23:03:39 -0000	1.4
+++ theme.cpp	31 Jan 2006 14:38:42 -0000	1.5
@@ -264,12 +264,25 @@
 	box(r.left, r.top, checkBoxSize, checkBoxSize, _color, _shadowcolor);
 
 	if (checked) {
-		// TODO: implement old style
-		r2.top += 2;
-		r2.bottom = r.top + checkBoxSize - 2;
-		r2.left += 2;
-		r2.right = r.left + checkBoxSize - 2;
-		_screen.fillRect(r2, getColor(state));
+		r2.top += 3;
+		r2.bottom = r.top + checkBoxSize - 4;
+		r2.left += 3;
+		r2.right = r.left + checkBoxSize - 4;
+
+		OverlayColor c = getColor(state);
+
+		// Draw a cross
+		_screen.drawLine(r2.left, r2.top, r2.right, r2.bottom, c);
+		_screen.drawLine(r2.left, r2.bottom, r2.right, r2.top, c);
+
+		if (r2.height() > 5) {
+			// Thicken the lines
+			_screen.drawLine(r2.left, r2.top + 1, r2.right - 1, r2.bottom, c);
+			_screen.drawLine(r2.left + 1, r2.top, r2.right, r2.bottom - 1, c);
+			_screen.drawLine(r2.left, r2.bottom - 1, r2.right - 1, r2.top, c);
+			_screen.drawLine(r2.left + 1, r2.bottom, r2.right, r2.top + 1, c);
+		}
+
 		r2 = r;
 	}
 





More information about the Scummvm-git-logs mailing list