diff options
author | Willem Jan Palenstijn | 2009-10-05 18:00:12 +0000 |
---|---|---|
committer | Willem Jan Palenstijn | 2009-10-05 18:00:12 +0000 |
commit | 2a06f341811da796f28ae07dc03cb54e5c2850fe (patch) | |
tree | 882b754fc4cabf1644cbb6530dd777c96569f7ae | |
parent | ac9faddd1749514d188857cd2df332deb029da8e (diff) | |
download | scummvm-rg350-2a06f341811da796f28ae07dc03cb54e5c2850fe.tar.gz scummvm-rg350-2a06f341811da796f28ae07dc03cb54e5c2850fe.tar.bz2 scummvm-rg350-2a06f341811da796f28ae07dc03cb54e5c2850fe.zip |
SCI: Move restoreRect adjustment from DrawWindow to NewWindow
svn-id: r44668
-rw-r--r-- | engines/sci/gui/gui_windowmgr.cpp | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/engines/sci/gui/gui_windowmgr.cpp b/engines/sci/gui/gui_windowmgr.cpp index ab355ba741..756b327a7b 100644 --- a/engines/sci/gui/gui_windowmgr.cpp +++ b/engines/sci/gui/gui_windowmgr.cpp @@ -172,6 +172,15 @@ GuiWindow *SciGuiWindowMgr::NewWindow(const Common::Rect &dims, const Common::Re pwnd->rect.top + pwnd->dims.top - oldtop); if (restoreRect == 0) pwnd->restoreRect = pwnd->dims; + + // CHECKME: Is this 'kTransparent' check necessary? + // The shadow is already drawn if !(wndStyle & (kUser | kNoFrame)). + if (!(pwnd->wndStyle & (kTransparent | kUser | kNoFrame))) { + // The shadow is drawn slightly outside the window. + // Enlarge restoreRect to cover that. + pwnd->restoreRect.bottom++; + pwnd->restoreRect.right++; + } if (draw) DrawWindow(pwnd); @@ -191,12 +200,6 @@ void SciGuiWindowMgr::DrawWindow(GuiWindow *pWnd) { GuiPort *oldport = _gfx->SetPort(_wmgrPort); _gfx->PenColor(0); if ((wndStyle & kTransparent) == 0) { - // Store the shadow, if it exists - if (!(wndStyle & kUser) && !(wndStyle & kNoFrame)) { - pWnd->restoreRect.bottom++; - pWnd->restoreRect.right++; - } - pWnd->hSaved1 = _gfx->SaveBits(pWnd->restoreRect, 1); if (pWnd->uSaveFlag & 2) { pWnd->hSaved2 = _gfx->SaveBits(pWnd->restoreRect, 2); |