From 4662642bc3f8ac2e680d48e9bf34c703991c8652 Mon Sep 17 00:00:00 2001 From: Borja Lorente Date: Fri, 8 Jul 2016 12:41:44 +0200 Subject: MACVENTURE: Adjust drag selection to account for window movement --- engines/macventure/gui.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/engines/macventure/gui.cpp b/engines/macventure/gui.cpp index 43dfe71883..f8430e1efa 100644 --- a/engines/macventure/gui.cpp +++ b/engines/macventure/gui.cpp @@ -827,6 +827,7 @@ void Gui::printText(const Common::String & text) { WindowReference Gui::findWindowAtPoint(Common::Point point) { + // HACK, MIGHT NEED TO LOOK INTO THE Graphcis::MacWindow dimensions to account for window movement Common::List::iterator it; for (it = _windowData->begin(); it != _windowData->end(); it++) { if (it->bounds.contains(point) && it->refcon != kDiplomaWindow) { //HACK, diploma should be cosnidered @@ -839,7 +840,8 @@ WindowReference Gui::findWindowAtPoint(Common::Point point) { Common::Point Gui::getWindowSurfacePos(WindowReference reference) { const WindowData &data = getWindowData(reference); BorderBounds border = borderBounds(data.type); - return Common::Point(data.bounds.left + border.leftOffset, data.bounds.top + border.topOffset); + Graphics::MacWindow *win = findWindow(reference); + return Common::Point(win->getDimensions().left + border.leftOffset, win->getDimensions().top + border.topOffset); } WindowData & Gui::findWindowData(WindowReference reference) { @@ -1251,7 +1253,7 @@ bool Gui::processInventoryEvents(WindowClick click, Common::Event & event) { if (_engine->needsClickToContinue()) return true; - if (click == kBorderInner && event.type == Common::EVENT_LBUTTONDOWN) { + if (event.type == Common::EVENT_LBUTTONDOWN) { // Find the appropriate window WindowReference ref = findWindowAtPoint(event.mouse); -- cgit v1.2.3