aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTorbjörn Andersson2016-09-04 00:36:58 +0200
committerTorbjörn Andersson2016-09-04 08:31:39 +0200
commit923efc2a4e1ad208f44a38ee6aa80316fbda1ade (patch)
tree4487d12abf430a9772fae8d396634b907a055fba
parent40c65540fac262fbd70478eb8017f260780fb1a4 (diff)
downloadscummvm-rg350-923efc2a4e1ad208f44a38ee6aa80316fbda1ade.tar.gz
scummvm-rg350-923efc2a4e1ad208f44a38ee6aa80316fbda1ade.tar.bz2
scummvm-rg350-923efc2a4e1ad208f44a38ee6aa80316fbda1ade.zip
MACVENTURE: Set background pattern for exits window
In the original, the background is actually a clickable object. I don't know if we want to implement this as a dark gray background pattern, or as a real object. For now, though, it's a useful test case for setBackgroundPattern().
-rw-r--r--engines/macventure/gui.cpp14
1 files changed, 6 insertions, 8 deletions
diff --git a/engines/macventure/gui.cpp b/engines/macventure/gui.cpp
index 7b725ba3b7..7cfc211b41 100644
--- a/engines/macventure/gui.cpp
+++ b/engines/macventure/gui.cpp
@@ -253,6 +253,11 @@ void Gui::initWindows() {
_exitsWindow->setDimensions(getWindowData(kExitsWindow).bounds);
_exitsWindow->setActive(false);
_exitsWindow->setCallback(exitsWindowCallback, this);
+
+ // TODO: In the original, the background is actually a clickable
+ // object that can be used to refer to the room itself. In that case,
+ // the background should be kPatternDarkGray.
+ _exitsWindow->setBackgroundPattern(kPatternLightGray);
loadBorders(_exitsWindow, findWindowData(kExitsWindow).type);
}
@@ -654,18 +659,11 @@ void Gui::drawInventories() {
void Gui::drawExitsWindow() {
Graphics::ManagedSurface *srf = _exitsWindow->getSurface();
- BorderBounds border = borderBounds(getWindowData(kExitsWindow).type);
-
- srf->fillRect(Common::Rect(
- border.leftOffset,
- border.topOffset,
- srf->w + border.rightOffset,
- srf->h + border.bottomOffset), kColorWhite);
Common::Array<CommandButton>::const_iterator it = _exitsData->begin();
for (; it != _exitsData->end(); ++it) {
CommandButton button = *it;
- button.draw(*_exitsWindow->getSurface());
+ button.draw(*srf);
}
findWindow(kExitsWindow)->setDirty(true);