diff options
-rw-r--r-- | engines/fullpipe/modal.cpp | 16 | ||||
-rw-r--r-- | engines/fullpipe/modal.h | 1 |
2 files changed, 17 insertions, 0 deletions
diff --git a/engines/fullpipe/modal.cpp b/engines/fullpipe/modal.cpp index ba42096e5a..b2f5bde393 100644 --- a/engines/fullpipe/modal.cpp +++ b/engines/fullpipe/modal.cpp @@ -1037,6 +1037,22 @@ int ModalMainMenu::checkHover(Common::Point &point) { return 0; } +bool ModalMainMenu::isOverArea(PictureObject *obj, Common::Point *point) { + Common::Point p; + + obj->getDimensions(&p); + + int left = point->x - 8; + int right = point->x + 12; + int down = point->y - 11; + int up = point->y + 9; + + if (left >= obj->_ox && right < obj->_ox + p.x && down >= obj->_oy && up < obj->_oy + p.y) + return true; + + return false; +} + bool ModalMainMenu::isSaveAllowed() { warning("STUB: ModalMainMenu::isSaveAllowed()"); diff --git a/engines/fullpipe/modal.h b/engines/fullpipe/modal.h index c891ed46bf..78ddf71f54 100644 --- a/engines/fullpipe/modal.h +++ b/engines/fullpipe/modal.h @@ -186,6 +186,7 @@ private: int checkHover(Common::Point &point); void updateVolume(); void updateSliderPos(); + bool isOverArea(PictureObject *obj, Common::Point *point); }; class ModalHelp : public BaseModalObject { |