aboutsummaryrefslogtreecommitdiff
path: root/gui
diff options
context:
space:
mode:
authorTorbjörn Andersson2006-01-31 08:41:51 +0000
committerTorbjörn Andersson2006-01-31 08:41:51 +0000
commit74dd2e133d05d62ab184fbecf1692f8bb18fe5ec (patch)
tree6a0aef0ddc7c2f276cf18fab98cb9baa35a3f8ac /gui
parent9246a7a532f84a2a87189caa96dd5a336eae42d9 (diff)
downloadscummvm-rg350-74dd2e133d05d62ab184fbecf1692f8bb18fe5ec.tar.gz
scummvm-rg350-74dd2e133d05d62ab184fbecf1692f8bb18fe5ec.tar.bz2
scummvm-rg350-74dd2e133d05d62ab184fbecf1692f8bb18fe5ec.zip
I didn't realize that disabled widgets were transparent, rather than just
faded. In those cases, I guess the background should be restored before drawing. But that can probably be done in the drawSurface / drawRect functions instead, like this. svn-id: r20329
Diffstat (limited to 'gui')
-rw-r--r--gui/ThemeNew.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/gui/ThemeNew.cpp b/gui/ThemeNew.cpp
index 0322227d97..e955ffc293 100644
--- a/gui/ThemeNew.cpp
+++ b/gui/ThemeNew.cpp
@@ -656,6 +656,9 @@ void ThemeNew::drawRectMasked(const Common::Rect &r, const Graphics::Surface *co
int specialHeight = 0;
int specialWidth = 0;
+ if (alpha != 256)
+ restoreBackground(r);
+
if (drawHeight*2 > r.height()) {
drawHeight = r.height() / 2;
partsH = 2;
@@ -747,6 +750,9 @@ void ThemeNew::drawSurfaceMasked(const Common::Rect &r, const Graphics::Surface
const OverlayColor transparency = _colors[kColorTransparency];
+ if (alpha != 256)
+ restoreBackground(r);
+
if (upDown && !leftRight) { // upsidedown
src = (const OverlayColor*)surf->pixels + (surf->h - 1) * surf->w;
int drawWidth = (r.width() < surf->w) ? r.width() : surf->w;