diff options
author | David Fioramonti | 2018-07-24 04:30:14 -0700 |
---|---|---|
committer | Bastien Bouclet | 2018-07-27 16:16:29 +0200 |
commit | 51351111d48ae6f8c8d74e04a30042521285b4b7 (patch) | |
tree | 3ed19fffae6a1fc682ecd2d83051c37234140a8a /engines/mohawk/riven_stacks/domespit.h | |
parent | 560f10c346d618caa6bdcc42647f691d6ab26fd0 (diff) | |
download | scummvm-rg350-51351111d48ae6f8c8d74e04a30042521285b4b7.tar.gz scummvm-rg350-51351111d48ae6f8c8d74e04a30042521285b4b7.tar.bz2 scummvm-rg350-51351111d48ae6f8c8d74e04a30042521285b4b7.zip |
MOHAWK: RIVEN: Only use x mouse position to move dome sliders
Fixes Trac#10642.
The original engine will move the dome sliders whenever the player is
dragging a dome slider to the left or right regardless of y position.
In ScummVM the dome slider position would only change to the players x
mouse position when the y value was also in the slider hotspot. This
change removes the y check by making the point to be checked always
have a y value in the hotspot rect.
The x values are also bound to the max and min value that any of the
slider hotspots can have. This allows the slider to go all the way to
the left and right even if the user has gone past the slider area
to the left or right while still holding the slider.
Diffstat (limited to 'engines/mohawk/riven_stacks/domespit.h')
-rw-r--r-- | engines/mohawk/riven_stacks/domespit.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/engines/mohawk/riven_stacks/domespit.h b/engines/mohawk/riven_stacks/domespit.h index 26f0962c47..d5f2e7fca2 100644 --- a/engines/mohawk/riven_stacks/domespit.h +++ b/engines/mohawk/riven_stacks/domespit.h @@ -43,7 +43,7 @@ protected: void checkSliderCursorChange(uint16 startHotspot); void dragDomeSlider(uint16 startHotspot); void drawDomeSliders(uint16 startHotspot); - int16 getSliderSlotAtPos(uint16 startHotspot, const Common::Point &pos) const; + int16 getSliderSlotClosestToPos(uint16 startHotspot, const Common::Point &pos) const; bool isSliderAtSlot(int16 slot) const; Common::String buildCardResourceName(const Common::String &name) const; |