[Scummvm-cvs-logs] SF.net SVN: scummvm: [24234] scummvm/trunk/gui

lordhoto at users.sourceforge.net lordhoto at users.sourceforge.net
Sun Oct 8 22:46:17 CEST 2006


Revision: 24234
          http://svn.sourceforge.net/scummvm/?rev=24234&view=rev
Author:   lordhoto
Date:     2006-10-08 13:46:09 -0700 (Sun, 08 Oct 2006)

Log Message:
-----------
Adding option to enable/disable blending for the classic theme.

Modified Paths:
--------------
    scummvm/trunk/gui/ThemeClassic.cpp
    scummvm/trunk/gui/theme.h
    scummvm/trunk/gui/themes/classic080.ini

Modified: scummvm/trunk/gui/ThemeClassic.cpp
===================================================================
--- scummvm/trunk/gui/ThemeClassic.cpp	2006-10-08 20:37:39 UTC (rev 24233)
+++ scummvm/trunk/gui/ThemeClassic.cpp	2006-10-08 20:46:09 UTC (rev 24234)
@@ -22,10 +22,11 @@
 #include "gui/theme.h"
 #include "gui/eval.h"
 
-#define THEME_VERSION 1
+#define THEME_VERSION 2
 
 namespace GUI {
 ThemeClassic::ThemeClassic(OSystem *system, const Common::String &config, const Common::ConfigFile *cfg) : Theme() {
+	_enableBlending = true;
 	_stylefile = config;
 	_system = system;
 	_initOk = false;
@@ -487,7 +488,7 @@
 #ifdef CT_NO_TRANSPARENCY
 	_screen.fillRect(r, _bgcolor);
 #else
-	if (_dialog) {
+	if (_dialog && _enableBlending) {
 		if (!_dialog->screen.pixels) {
 			_screen.fillRect(r, _bgcolor);
 			return;
@@ -580,7 +581,7 @@
 void ThemeClassic::blendScreenToDialog() {
 	Common::Rect rect(0, 0, _screen.w, _screen.h);
 
-	if (!rect.isValidRect())
+	if (!rect.isValidRect() || !_enableBlending)
 		return;
 
 	if (_system->hasFeature(OSystem::kFeatureOverlaySupportsAlpha)) {
@@ -695,6 +696,8 @@
 		_fontName = temp;
 	}
 
+	_enableBlending = (_evaluator->getVar("blending") != 0);
+
 	return true;
 }
 

Modified: scummvm/trunk/gui/theme.h
===================================================================
--- scummvm/trunk/gui/theme.h	2006-10-08 20:37:39 UTC (rev 24233)
+++ scummvm/trunk/gui/theme.h	2006-10-08 20:46:09 UTC (rev 24234)
@@ -302,6 +302,7 @@
 
 	void blendScreenToDialog();
 #endif
+	bool _enableBlending;
 
 	bool _forceRedraw;
 	bool _initOk;

Modified: scummvm/trunk/gui/themes/classic080.ini
===================================================================
--- scummvm/trunk/gui/themes/classic080.ini	2006-10-08 20:37:39 UTC (rev 24233)
+++ scummvm/trunk/gui/themes/classic080.ini	2006-10-08 20:46:09 UTC (rev 24234)
@@ -1,7 +1,7 @@
 # $URL$
 # $Id$
 [theme]
-version=1
+version=2
 type=classic
 name=Classic (ScummVM 0.8.0)
 
@@ -14,6 +14,7 @@
 
 [extra]
 font="builtin"
+blending=true
 
 # Define our classic greenish theme here
 [320xY]


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