diff options
Diffstat (limited to 'engines/macventure/gui.cpp')
-rw-r--r-- | engines/macventure/gui.cpp | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/engines/macventure/gui.cpp b/engines/macventure/gui.cpp index caa756f755..deb4a09a77 100644 --- a/engines/macventure/gui.cpp +++ b/engines/macventure/gui.cpp @@ -639,7 +639,7 @@ void Gui::drawConsoleWindow() { Graphics::ManagedSurface *srf = _outConsoleWindow->getSurface(); BorderBounds bounds = borderBounds(getWindowData(kOutConsoleWindow).type); - _consoleText->renderInto(srf, bounds.leftOffset); + _consoleText->renderInto(srf, bounds, kConsoleLeftOffset); } void Gui::drawObjectsInWindow(const WindowData &targetData, Graphics::ManagedSurface *surface) { @@ -651,10 +651,7 @@ void Gui::drawObjectsInWindow(const WindowData &targetData, Graphics::ManagedSur if (targetData.children.size() == 0) return; Graphics::ManagedSurface *composeSurface = new Graphics::ManagedSurface(); - composeSurface->create( - surface->w - border.leftOffset - border.rightOffset, - surface->h - border.topOffset - border.bottomOffset, - surface->format); + createInnerSurface(composeSurface, surface, border); composeSurface->clear(kColorGreen); for (uint i = 0; i < targetData.children.size(); i++) { @@ -879,6 +876,13 @@ void Gui::saveInto(int slot) { _engine->preparedToRun(); } +void Gui::createInnerSurface(Graphics::ManagedSurface *innerSurface, Graphics::ManagedSurface *outerSurface, const BorderBounds &borders) { + innerSurface->create( + outerSurface->w - borders.leftOffset - borders.rightOffset, + outerSurface->h - borders.topOffset - borders.bottomOffset, + outerSurface->format); +} + void Gui::moveDraggedObject(Common::Point target) { ensureAssetLoaded(_draggedObj.id); _draggedObj.pos = target + _draggedObj.mouseOffset; |