diff options
-rw-r--r-- | gui/ThemeClassic.cpp | 9 | ||||
-rw-r--r-- | gui/theme.h | 1 | ||||
-rw-r--r-- | gui/themes/classic080.ini | 3 |
3 files changed, 9 insertions, 4 deletions
diff --git a/gui/ThemeClassic.cpp b/gui/ThemeClassic.cpp index 1ec719bf8a..d1b434a535 100644 --- a/gui/ThemeClassic.cpp +++ b/gui/ThemeClassic.cpp @@ -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 @@ void ThemeClassic::restoreBackground(Common::Rect r, bool special) { #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 @@ OverlayColor ThemeClassic::getColor(State state) { 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 @@ bool ThemeClassic::loadConfig() { _fontName = temp; } + _enableBlending = (_evaluator->getVar("blending") != 0); + return true; } diff --git a/gui/theme.h b/gui/theme.h index 022cf51b33..ad654ccb1e 100644 --- a/gui/theme.h +++ b/gui/theme.h @@ -302,6 +302,7 @@ private: void blendScreenToDialog(); #endif + bool _enableBlending; bool _forceRedraw; bool _initOk; diff --git a/gui/themes/classic080.ini b/gui/themes/classic080.ini index d9ea7da855..6f425c8aeb 100644 --- a/gui/themes/classic080.ini +++ b/gui/themes/classic080.ini @@ -1,7 +1,7 @@ # $URL$ # $Id$ [theme] -version=1 +version=2 type=classic name=Classic (ScummVM 0.8.0) @@ -14,6 +14,7 @@ textcolorhi=0 255 0 [extra] font="builtin" +blending=true # Define our classic greenish theme here [320xY] |