diff options
author | johndoe123 | 2014-04-17 23:03:05 +0200 |
---|---|---|
committer | johndoe123 | 2014-04-17 23:03:05 +0200 |
commit | 88be409dc3cbab96ade83898a5269364799864bc (patch) | |
tree | 221a0fb143d4716f4876db1ee89bdf2f7247a65b | |
parent | c0d83b0b298f1116cb69948107ba867fc73f16df (diff) | |
parent | 640536a5842ff4bcb42aa7122746e4cabf4bdf01 (diff) | |
download | scummvm-rg350-88be409dc3cbab96ade83898a5269364799864bc.tar.gz scummvm-rg350-88be409dc3cbab96ade83898a5269364799864bc.tar.bz2 scummvm-rg350-88be409dc3cbab96ade83898a5269364799864bc.zip |
Merge branch 'master' of github.com:scummvm/scummvm
-rw-r--r-- | engines/fullpipe/modal.cpp | 26 |
1 files changed, 23 insertions, 3 deletions
diff --git a/engines/fullpipe/modal.cpp b/engines/fullpipe/modal.cpp index b2f5bde393..5cdc449d91 100644 --- a/engines/fullpipe/modal.cpp +++ b/engines/fullpipe/modal.cpp @@ -838,7 +838,7 @@ ModalMainMenu::ModalMainMenu() { area->picObjL = _scene->getPictureObjectById(area->picIdL, 0); area->picObjL->_flags &= 0xFFFB; _areas.push_back(area); - _musicSliderIdx = _areas.size(); + _musicSliderIdx = _areas.size() - 1; if (g_fp->_mainMenu_debugEnabled) enableDebugMenuButton(); @@ -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) { |