MACVENTURE: Begin fixing second inventory problem

This commit is contained in:
Borja Lorente 2016-07-10 23:03:26 +02:00
parent b6acfe868c
commit a5a094b6bd

View File

@ -830,6 +830,7 @@ WindowReference Gui::findWindowAtPoint(Common::Point point) {
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
if (findWindow(it->refcon)->isActive())
return it->refcon;
}
}
@ -957,6 +958,7 @@ void Gui::selectDraggable(ObjID child, WindowReference origin, Common::Point sta
void Gui::handleDragRelease(Common::Point pos, bool shiftPressed, bool isDoubleClick) {
WindowReference destinationWindow = findWindowAtPoint(pos);
if (destinationWindow == kNoWindow) return;
if (_draggedObj.id != 0) {
if (_draggedObj.hasMoved) {
ObjID destObject = getWindowData(destinationWindow).objRef;
@ -1260,6 +1262,7 @@ bool Gui::processInventoryEvents(WindowClick click, Common::Event & event) {
// Find the appropriate window
WindowReference ref = findWindowAtPoint(event.mouse);
if (ref == kNoWindow) return false;
Graphics::MacWindow *win = findWindow(ref);
WindowData &data = findWindowData((WindowReference) ref);
ObjID child;