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

Tanoku at users.sourceforge.net Tanoku at users.sourceforge.net
Thu Aug 14 13:26:25 CEST 2008


Revision: 33863
          http://scummvm.svn.sourceforge.net/scummvm/?rev=33863&view=rev
Author:   Tanoku
Date:     2008-08-14 11:26:24 +0000 (Thu, 14 Aug 2008)

Log Message:
-----------
Several GFX tweaks/fixes.

Modified Paths:
--------------
    scummvm/branches/gsoc2008-gui/gui/ThemeRenderer.cpp
    scummvm/branches/gsoc2008-gui/gui/ThemeRenderer.h
    scummvm/branches/gsoc2008-gui/gui/themes/scummodern.zip

Modified: scummvm/branches/gsoc2008-gui/gui/ThemeRenderer.cpp
===================================================================
--- scummvm/branches/gsoc2008-gui/gui/ThemeRenderer.cpp	2008-08-14 10:58:28 UTC (rev 33862)
+++ scummvm/branches/gsoc2008-gui/gui/ThemeRenderer.cpp	2008-08-14 11:26:24 UTC (rev 33863)
@@ -53,7 +53,7 @@
 	{kDDWidgetBackgroundEditText, "widget_textedit", true, kDDNone},
 	{kDDWidgetBackgroundSlider, "widget_slider", true, kDDNone},
 
-	{kDDButtonIdle, "button_idle", true, kDDNone},
+	{kDDButtonIdle, "button_idle", true, kDDWidgetBackgroundSlider},
 	{kDDButtonHover, "button_hover", false, kDDButtonIdle},
 	{kDDButtonDisabled, "button_disabled", true, kDDNone},
 
@@ -503,7 +503,7 @@
 }
 
 void ThemeRenderer::queueDDText(TextData type, const Common::Rect &r, const Common::String &text, bool restoreBg,
-	bool elipsis, TextAlign alignH, TextAlignVertical alignV, int deltax) {
+	bool ellipsis, TextAlign alignH, TextAlignVertical alignV, int deltax) {
 		
 	if (_texts[type] == 0)
 		return;
@@ -517,6 +517,7 @@
 	q.alignV = alignV;
 	q.restoreBg = restoreBg;
 	q.deltax = deltax;
+	q.ellipsis = ellipsis;
 	
 	if (_buffering) {		
 		_textQueue.push_back(q);
@@ -565,7 +566,7 @@
 		restoreBackground(q.area);
 	
 	_vectorRenderer->setFgColor(_texts[q.type]->_color.r, _texts[q.type]->_color.g, _texts[q.type]->_color.b);
-	_vectorRenderer->drawString(_texts[q.type]->_fontPtr, q.text, q.area, q.alignH, q.alignV, q.deltax, q.elipsis);
+	_vectorRenderer->drawString(_texts[q.type]->_fontPtr, q.text, q.area, q.alignH, q.alignV, q.deltax, q.ellipsis);
 	addDirtyRect(q.area);
 }
 
@@ -743,9 +744,6 @@
 		return;
 	
 	queueBitmap(&surface, r, themeTrans);
-	
-//	_vectorRenderer->blitSubSurface(&surface, r);
-//	addDirtyRect(r);
 }
 
 void ThemeRenderer::drawWidgetBackground(const Common::Rect &r, uint16 hints, WidgetBackground background, WidgetStateInfo state) {
@@ -800,7 +798,7 @@
 
 void ThemeRenderer::drawText(const Common::Rect &r, const Common::String &str, WidgetStateInfo state, TextAlign align, bool inverted, int deltax, bool useEllipsis, FontStyle font) {
 	if (!ready())
-		return;
+		return;	
 		
 	if (inverted) {
 		queueDD(kDDTextSelectionBackground, r);

Modified: scummvm/branches/gsoc2008-gui/gui/ThemeRenderer.h
===================================================================
--- scummvm/branches/gsoc2008-gui/gui/ThemeRenderer.h	2008-08-14 10:58:28 UTC (rev 33862)
+++ scummvm/branches/gsoc2008-gui/gui/ThemeRenderer.h	2008-08-14 11:26:24 UTC (rev 33863)
@@ -94,7 +94,7 @@
 	friend class GUI::GuiObject;
 
 	/** Constant value to expand dirty rectangles, to make sure they are fully copied */
-	static const int kDirtyRectangleThreshold = 0;
+	static const int kDirtyRectangleThreshold = 1;
 	
 	/** Sets whether backcaching is enabled */
 	static const bool kEnableBackCaching = true;
@@ -193,7 +193,7 @@
 		
 		GUI::Theme::TextAlign alignH;
 		GUI::Theme::TextAlignVertical alignV;
-		bool elipsis;
+		bool ellipsis;
 		bool restoreBg;
 		int deltax;
 	};


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