aboutsummaryrefslogtreecommitdiff
path: root/engines/macventure/gui.cpp
diff options
context:
space:
mode:
authorBorja Lorente2016-07-08 12:41:44 +0200
committerBorja Lorente2016-08-14 18:49:29 +0200
commit4662642bc3f8ac2e680d48e9bf34c703991c8652 (patch)
tree4796015c6d1de44be84bb0275ded3098922f59bf /engines/macventure/gui.cpp
parent6da240a6e75d9e79d6254a338b905fbb2568d0e0 (diff)
downloadscummvm-rg350-4662642bc3f8ac2e680d48e9bf34c703991c8652.tar.gz
scummvm-rg350-4662642bc3f8ac2e680d48e9bf34c703991c8652.tar.bz2
scummvm-rg350-4662642bc3f8ac2e680d48e9bf34c703991c8652.zip
MACVENTURE: Adjust drag selection to account for window movement
Diffstat (limited to 'engines/macventure/gui.cpp')
-rw-r--r--engines/macventure/gui.cpp6
1 files 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<WindowData>::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);