diff options
author | Filippos Karapetis | 2014-12-03 00:06:38 +0200 |
---|---|---|
committer | Filippos Karapetis | 2014-12-03 00:06:38 +0200 |
commit | 637102d33b9ab69724c1badd9515e0e26a4b4b88 (patch) | |
tree | 72fe1291306ceb12c4da2956ab22814741dddce9 /engines/zvision/scripting/controls/push_toggle_control.h | |
parent | b1f7603263c368658a3b9b7e30a929bd77d895af (diff) | |
parent | 596a904a0c6aedba5bbe45cdfa931425450626c8 (diff) | |
download | scummvm-rg350-637102d33b9ab69724c1badd9515e0e26a4b4b88.tar.gz scummvm-rg350-637102d33b9ab69724c1badd9515e0e26a4b4b88.tar.bz2 scummvm-rg350-637102d33b9ab69724c1badd9515e0e26a4b4b88.zip |
Merge pull request #532 from Marisa-Chan/zvision
ZVISION: More complete engine implementation
Diffstat (limited to 'engines/zvision/scripting/controls/push_toggle_control.h')
-rw-r--r-- | engines/zvision/scripting/controls/push_toggle_control.h | 21 |
1 files changed, 18 insertions, 3 deletions
diff --git a/engines/zvision/scripting/controls/push_toggle_control.h b/engines/zvision/scripting/controls/push_toggle_control.h index 3854fc2005..6d68b8f162 100644 --- a/engines/zvision/scripting/controls/push_toggle_control.h +++ b/engines/zvision/scripting/controls/push_toggle_control.h @@ -26,6 +26,8 @@ #include "zvision/scripting/control.h" #include "common/rect.h" +#include "common/events.h" +#include "common/array.h" namespace ZVision { @@ -36,12 +38,19 @@ public: ~PushToggleControl(); /** + * Called when LeftMouse is pushed. Default is NOP. + * + * @param screenSpacePos The position of the mouse in screen space + * @param backgroundImageSpacePos The position of the mouse in background image space + */ + bool onMouseDown(const Common::Point &screenSpacePos, const Common::Point &backgroundImageSpacePos); + /** * Called when LeftMouse is lifted. Calls ScriptManager::setStateValue(_key, 1); * * @param screenSpacePos The position of the mouse in screen space * @param backgroundImageSpacePos The position of the mouse in background image space */ - void onMouseUp(const Common::Point &screenSpacePos, const Common::Point &backgroundImageSpacePos); + bool onMouseUp(const Common::Point &screenSpacePos, const Common::Point &backgroundImageSpacePos); /** * Called on every MouseMove. Tests if the mouse is inside _hotspot, and if so, sets the cursor. * @@ -57,9 +66,15 @@ private: * The area that will trigger the event * This is in image space coordinates, NOT screen space */ - Common::Rect _hotspot; + Common::Array<Common::Rect> _hotspots; /** The cursor to use when hovering over _hotspot */ - Common::String _hoverCursor; + int _cursor; + /** Button maximal values count */ + uint _countTo; + + Common::EventType _event; + + bool contain(const Common::Point &point); }; } // End of namespace ZVision |