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

Tanoku at users.sourceforge.net Tanoku at users.sourceforge.net
Mon Jul 14 20:42:38 CEST 2008


Revision: 33059
          http://scummvm.svn.sourceforge.net/scummvm/?rev=33059&view=rev
Author:   Tanoku
Date:     2008-07-14 11:42:38 -0700 (Mon, 14 Jul 2008)

Log Message:
-----------
Popup widget, separator widget.

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-14 13:35:43 UTC (rev 33058)
+++ scummvm/branches/gsoc2008-gui/gui/ThemeDefaultXML.cpp	2008-07-14 18:42:38 UTC (rev 33059)
@@ -50,11 +50,23 @@
 		"<drawstep func = 'fill' fill = 'gradient' gradient_start = '214, 113, 8' gradient_end = '240, 200, 25' />"
 	"</drawdata>"
 	
-	"<drawdata id = 'popup' cache = false>"
+	"<drawdata id = 'separator' cache = false>"
+		"<drawstep func = 'square' fill = 'foreground' height = '3' ypos = 'center' fg_color = '0, 0, 0' />"
+	"</drawdata>"
+	
+	"<drawdata id = 'popup_idle' cache = false>"
 		"<drawstep func = 'square' stroke = 0 fg_color = '0, 0, 0' fill = 'gradient' gradient_start = '214, 113, 8' gradient_end = '240, 200, 25' shadow = 3 />"
 		"<drawstep func = 'triangle' fg_color = '0, 0, 0' fill = 'foreground' width = '12' height = '12' xpos = '-16' ypos = 'center' orientation = 'bottom' />"
+		"<text vertical_align = 'center' horizontal_align = 'right' color = '0, 0, 0' />"
 	"</drawdata>"
 	
+	
+	"<drawdata id = 'popup_hover' cache = false>"
+		"<drawstep func = 'square' stroke = 0 fg_color = '0, 0, 0' fill = 'gradient' gradient_start = '214, 113, 8' gradient_end = '240, 200, 25' shadow = 3 />"
+		"<drawstep func = 'triangle' fg_color = '0, 0, 0' fill = 'foreground' width = '12' height = '12' xpos = '-16' ypos = 'center' orientation = 'bottom' />"
+		"<text vertical_align = 'center' horizontal_align = 'right' color = '255, 255, 255' />"
+	"</drawdata>"
+	
 	"<drawdata id = 'default_bg' cache = false>"
 		"<drawstep func = 'roundedsq' radius = 12 stroke = 4 fg_color = '206, 121, 99' fill = 'gradient' gradient_start = '255, 231, 140' gradient_end = '255, 243, 206' shadow = 3 />"
 	"</drawdata>"

Modified: scummvm/branches/gsoc2008-gui/gui/ThemeRenderer.cpp
===================================================================
--- scummvm/branches/gsoc2008-gui/gui/ThemeRenderer.cpp	2008-07-14 13:35:43 UTC (rev 33058)
+++ scummvm/branches/gsoc2008-gui/gui/ThemeRenderer.cpp	2008-07-14 18:42:38 UTC (rev 33059)
@@ -65,7 +65,9 @@
 	"scrollbar_base",
 	"scrollbar_handle",
 
-	"popup",
+	"popup_idle",
+	"popup_hover",
+	
 	"caret",
 	"separator"
 };
@@ -390,8 +392,15 @@
 	if (!ready())
 		return;
 		
-	drawDD(kDDPopUp, r);
-
+	DrawData dd = (state == kStateHighlight) ? kDDPopUpHover : kDDPopUpIdle;
+	
+	drawDD(dd, r);
+	
+	if (!sel.empty()) {
+		Common::Rect text(r.left, r.top, r.right - 16, r.bottom);
+		drawDDText(dd, text, sel);
+	}	
+	
 	debugWidgetPosition("Popup Widget", r);
 }
 

Modified: scummvm/branches/gsoc2008-gui/gui/ThemeRenderer.h
===================================================================
--- scummvm/branches/gsoc2008-gui/gui/ThemeRenderer.h	2008-07-14 13:35:43 UTC (rev 33058)
+++ scummvm/branches/gsoc2008-gui/gui/ThemeRenderer.h	2008-07-14 18:42:38 UTC (rev 33059)
@@ -107,7 +107,9 @@
 		kDDScrollbarBase,
 		kDDScrollbarHandle,
 
-		kDDPopUp,
+		kDDPopUpIdle,
+		kDDPopUpHover,
+		
 		kDDCaret,
 		kDDSeparator,
 		kDrawDataMAX


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