diff options
author | Torbjörn Andersson | 2006-01-31 08:41:51 +0000 |
---|---|---|
committer | Torbjörn Andersson | 2006-01-31 08:41:51 +0000 |
commit | 74dd2e133d05d62ab184fbecf1692f8bb18fe5ec (patch) | |
tree | 6a0aef0ddc7c2f276cf18fab98cb9baa35a3f8ac /gui | |
parent | 9246a7a532f84a2a87189caa96dd5a336eae42d9 (diff) | |
download | scummvm-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.cpp | 6 |
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; |