[Scummvm-cvs-logs] SF.net SVN: scummvm: [33005] scummvm/branches/gsoc2008-gui/gui

Tanoku at users.sourceforge.net Tanoku at users.sourceforge.net
Fri Jul 11 15:25:23 CEST 2008


Revision: 33005
          http://scummvm.svn.sourceforge.net/scummvm/?rev=33005&view=rev
Author:   Tanoku
Date:     2008-07-11 06:25:23 -0700 (Fri, 11 Jul 2008)

Log Message:
-----------
Widget backgrounds

Modified Paths:
--------------
    scummvm/branches/gsoc2008-gui/gui/ThemeDefaultXML.cpp
    scummvm/branches/gsoc2008-gui/gui/ThemeRenderer.cpp
    scummvm/branches/gsoc2008-gui/gui/ThemeRenderer.h

Modified: scummvm/branches/gsoc2008-gui/gui/ThemeDefaultXML.cpp
===================================================================
--- scummvm/branches/gsoc2008-gui/gui/ThemeDefaultXML.cpp	2008-07-11 13:13:28 UTC (rev 33004)
+++ scummvm/branches/gsoc2008-gui/gui/ThemeDefaultXML.cpp	2008-07-11 13:25:23 UTC (rev 33005)
@@ -61,11 +61,12 @@
 	"</drawdata>"
 
 	"<drawdata id = 'checkbox_disabled' cache = false>"
-		"<text vertical_align = 'center' horizontal_align = 'center' color = '255, 0, 0' />"
+		"<text vertical_align = 'top' horizontal_align = 'left' color = '255, 255, 255' />"
 		"<drawstep func = 'square' fill = 'gradient' gradient_start = '206, 121, 99' gradient_end = '173, 40, 8' size = 'auto' shadow = 0 />"
 	"</drawdata>"
 
 	"<drawdata id = 'checkbox_enabled' cache = false>"
+		"<text vertical_align = 'top' horizontal_align = 'left' color = '255, 255, 255' />"
 		"<drawstep func = 'square' fill = 'gradient' gradient_start = '206, 121, 99' gradient_end = '173, 40, 8' size = 'auto' shadow = 0 />"
 		"<drawstep func = 'circle' radius = 'auto' fill = 'foreground' />"
 	"</drawdata>"

Modified: scummvm/branches/gsoc2008-gui/gui/ThemeRenderer.cpp
===================================================================
--- scummvm/branches/gsoc2008-gui/gui/ThemeRenderer.cpp	2008-07-11 13:13:28 UTC (rev 33004)
+++ scummvm/branches/gsoc2008-gui/gui/ThemeRenderer.cpp	2008-07-11 13:25:23 UTC (rev 33005)
@@ -323,19 +323,18 @@
 		return;
 
 	Common::Rect r2 = r;
-	int checkBoxSize = getFontHeight();
+	const int checkBoxSize = MIN((int)r.height(), getFontHeight());
 
-	if (checkBoxSize > r.height())
-		checkBoxSize = r.height();
-
 	r2.bottom = r2.top + checkBoxSize;
 	r2.right = r2.left + checkBoxSize;
 
 	drawDD(checked ? kDDCheckboxEnabled : kDDCheckboxDisabled, r2);
+	
+	r2.left = r2.right + checkBoxSize;
+	r2.right = r.right;
+	
+	drawDDText(checked ? kDDCheckboxEnabled : kDDCheckboxDisabled, r2, str);
 
-	// TODO: text drawing
-//	getFont()->drawString(&_screen, str, r2.left, r2.top, r2.width(), getColor(state), Graphics::kTextAlignLeft, 0, false);
-
 	addDirtyRect(r);
 	debugWidgetPosition(r);
 }
@@ -365,7 +364,16 @@
 void ThemeRenderer::drawDialogBackground(const Common::Rect &r, uint16 hints, WidgetStateInfo state) {
 	if (!ready())
 		return;
-
+		
+	if (hints & THEME_HINT_MAIN_DIALOG)
+		drawDD(kDDMainDialogBackground, r);
+	else if (hints & THEME_HINT_SPECIAL_COLOR) 
+		drawDD(kDDSpecialColorBackground, r);
+	else if (hints & THEME_HINT_PLAIN_COLOR)
+		drawDD(kDDPlainColorBackground, r);	
+	else
+		drawDD(kDDDefaultBackground, r);
+	
 	debugWidgetPosition(r);
 }
 

Modified: scummvm/branches/gsoc2008-gui/gui/ThemeRenderer.h
===================================================================
--- scummvm/branches/gsoc2008-gui/gui/ThemeRenderer.h	2008-07-11 13:13:28 UTC (rev 33004)
+++ scummvm/branches/gsoc2008-gui/gui/ThemeRenderer.h	2008-07-11 13:25:23 UTC (rev 33005)
@@ -85,7 +85,7 @@
 		kDDMainDialogBackground,
 		kDDSpecialColorBackground,
 		kDDPlainColorBackground,
-		kDDDefaulBackground,
+		kDDDefaultBackground,
 
 		kDDButtonIdle,
 		kDDButtonHover,


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