From 777923be660749e792d993be9f8f2c08fb801dc4 Mon Sep 17 00:00:00 2001 From: Borja Lorente Date: Wed, 13 Jul 2016 14:47:32 +0200 Subject: MACVENTURE: Correct object drop position --- engines/macventure/gui.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'engines/macventure') diff --git a/engines/macventure/gui.cpp b/engines/macventure/gui.cpp index 7eccb16a95..71a7d0c132 100644 --- a/engines/macventure/gui.cpp +++ b/engines/macventure/gui.cpp @@ -681,12 +681,12 @@ void Gui::drawObjectsInWindow(WindowReference target, Graphics::ManagedSurface * surface, pos.x, pos.y, kBlitOR); // For test - /*surface->frameRect(Common::Rect( + surface->frameRect(Common::Rect( pos.x, pos.y, pos.x + _assets[child]->getWidth() + 1, pos.y + _assets[child]->getHeight() + 1), kColorGreen); - */ + } } @@ -991,7 +991,7 @@ void Gui::handleDragRelease(Common::Point pos, bool shiftPressed, bool isDoubleC if (_draggedObj.id != 0) { if (_draggedObj.hasMoved) { ObjID destObject = getWindowData(destinationWindow).objRef; - pos -= _draggedObj.startPos; + pos -= (_draggedObj.startPos - _draggedObj.mouseOffset); pos = localize(pos, _draggedObj.startWin, destinationWindow); debug("drop the object at obj %d, pos (%d, %d)", destObject, pos.x, pos.y); -- cgit v1.2.3