aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
authorEugene Sandulenko2014-04-17 22:50:28 +0300
committerEugene Sandulenko2014-04-17 22:50:28 +0300
commit7edb9af72cd468d71d2cb33e8cf71aa38286e29c (patch)
tree91ff38608356004dee236e9cb5dd17eddae0457a /engines
parent4904554bb6ddd250de6bcb356b5660c9c57b5a2b (diff)
downloadscummvm-rg350-7edb9af72cd468d71d2cb33e8cf71aa38286e29c.tar.gz
scummvm-rg350-7edb9af72cd468d71d2cb33e8cf71aa38286e29c.tar.bz2
scummvm-rg350-7edb9af72cd468d71d2cb33e8cf71aa38286e29c.zip
FULLPIPE: Implement ModalMainMenu::checkHover()
Diffstat (limited to 'engines')
-rw-r--r--engines/fullpipe/modal.cpp24
1 files changed, 22 insertions, 2 deletions
diff --git a/engines/fullpipe/modal.cpp b/engines/fullpipe/modal.cpp
index b2f5bde393..50ef3ecb48 100644
--- a/engines/fullpipe/modal.cpp
+++ b/engines/fullpipe/modal.cpp
@@ -1032,9 +1032,29 @@ void ModalMainMenu::updateSliderPos() {
}
int ModalMainMenu::checkHover(Common::Point &point) {
- warning("STUB: ModalMainMenu::checkHover()");
+ for (uint i = 0; i < _areas.size(); i++) {
+ if (_areas[i]->picObjL->isPixelHitAtPos(point.x, point.y)) {
+ _areas[i]->picObjL->_flags |= 4;
- return 0;
+ return i;
+ } else {
+ _areas[i]->picObjL->_flags &= 0xFFFB;
+ }
+ }
+
+ if (isOverArea(_areas[_menuSliderIdx]->picObjL, &point)) {
+ _areas[_menuSliderIdx]->picObjL->_flags |= 4;
+
+ return _menuSliderIdx;
+ }
+
+ if (isOverArea(_areas[_musicSliderIdx]->picObjL, &point)) {
+ _areas[_musicSliderIdx]->picObjL->_flags |= 4;
+
+ return _musicSliderIdx;
+ }
+
+ return -1;
}
bool ModalMainMenu::isOverArea(PictureObject *obj, Common::Point *point) {