aboutsummaryrefslogtreecommitdiff
path: root/engines/macventure/gui.cpp
diff options
context:
space:
mode:
authorBorja Lorente2016-07-13 18:48:50 +0200
committerBorja Lorente2016-08-14 18:54:52 +0200
commitc36f8c429fd213aa9b3fbe58c894036a1dc26473 (patch)
tree93ccbdc86bb7a217b6c4c4b72f80a0542969058e /engines/macventure/gui.cpp
parent2ba8b1ca8c418e3c3b3f5d90155e1a76eb95f16e (diff)
downloadscummvm-rg350-c36f8c429fd213aa9b3fbe58c894036a1dc26473.tar.gz
scummvm-rg350-c36f8c429fd213aa9b3fbe58c894036a1dc26473.tar.bz2
scummvm-rg350-c36f8c429fd213aa9b3fbe58c894036a1dc26473.zip
MACVENTURE: Soften conditions for object selection
Diffstat (limited to 'engines/macventure/gui.cpp')
-rw-r--r--engines/macventure/gui.cpp14
1 files changed, 6 insertions, 8 deletions
diff --git a/engines/macventure/gui.cpp b/engines/macventure/gui.cpp
index a056e1ba23..0b7606ce51 100644
--- a/engines/macventure/gui.cpp
+++ b/engines/macventure/gui.cpp
@@ -308,6 +308,9 @@ void Gui::updateWindowInfo(WindowReference ref, ObjID objID, const Common::Array
}
void Gui::addChild(WindowReference target, ObjID child) {
+ // HACK WRONG!! Please delete me when you are done testing!
+ if (child == 92) return; // Avoid adding the stones in the waterfall
+
findWindowData(target).children.push_back(DrawableObject(child, kBlitBIC));
}
@@ -819,7 +822,7 @@ void Gui::updateExit(ObjID obj) {
}
void Gui::printText(const Common::String & text) {
- debug("Print Text: %s", text);
+ debug(1, "Print Text: %s", text.c_str());
_consoleText->printLine(text, _outConsoleWindow->getDimensions().width());
}
@@ -947,16 +950,12 @@ void Gui::checkSelect(const WindowData &data, const Common::Event &event, const
}
bool Gui::canBeSelected(ObjID obj, const Common::Event &event, const Common::Rect &clickRect, WindowReference ref) {
- return (_engine->isObjVisible(obj) &&
- _engine->isObjClickable(obj) &&
+ return (_engine->isObjClickable(obj) &&
isRectInsideObject(clickRect, obj));
}
bool Gui::isRectInsideObject(Common::Rect target, ObjID obj) {
- if (_assets.contains(obj) &&
- //_engine->isObjClickable(obj) &&
- _engine->isObjVisible(obj))
- {
+ if (_assets.contains(obj)) {
Common::Rect bounds = _engine->getObjBounds(obj);
Common::Rect intersection = bounds.findIntersectingRect(target);
// We translate it to the image's coord system
@@ -966,7 +965,6 @@ bool Gui::isRectInsideObject(Common::Rect target, ObjID obj) {
intersection.left - bounds.left + intersection.width(),
intersection.top - bounds.top + intersection.height());
-
if (_assets[obj]->isRectInside(intersection)) {
return true;
}