aboutsummaryrefslogtreecommitdiff
path: root/engines/mohawk/riven_stack.h
diff options
context:
space:
mode:
authorBastien Bouclet2017-01-28 14:05:26 +0100
committerEugene Sandulenko2017-07-03 08:50:10 +0200
commit286cdef658dbd18a6bb3b71fdfa9b133efb6a8e4 (patch)
treea78d0eff08a2414a19a0d6f1b1d74305e79c59e6 /engines/mohawk/riven_stack.h
parent92e03a7b684c019d7670a56feb8e3a6cfd2e85b2 (diff)
downloadscummvm-rg350-286cdef658dbd18a6bb3b71fdfa9b133efb6a8e4.tar.gz
scummvm-rg350-286cdef658dbd18a6bb3b71fdfa9b133efb6a8e4.tar.bz2
scummvm-rg350-286cdef658dbd18a6bb3b71fdfa9b133efb6a8e4.zip
MOHAWK: Add basic mouse handling to RivenStack
Diffstat (limited to 'engines/mohawk/riven_stack.h')
-rw-r--r--engines/mohawk/riven_stack.h15
1 files changed, 14 insertions, 1 deletions
diff --git a/engines/mohawk/riven_stack.h b/engines/mohawk/riven_stack.h
index e1e5455c3b..b08052e4e8 100644
--- a/engines/mohawk/riven_stack.h
+++ b/engines/mohawk/riven_stack.h
@@ -25,6 +25,7 @@
#include "common/hash-str.h"
#include "common/ptr.h"
+#include "common/rect.h"
#include "common/str-array.h"
namespace Mohawk {
@@ -110,6 +111,15 @@ public:
/** Install a timer for the current card if one is defined */
virtual void installCardTimer();
+ /** Handle a mouse down event */
+ void onMouseDown(const Common::Point &mouse);
+
+ /** Handle a mouse up event */
+ void onMouseUp(const Common::Point &mouse);
+
+ /** Handle a mouse move event */
+ void onMouseMove(const Common::Point &mouse);
+
// Common external commands
void xflies(uint16 argc, uint16 *argv); // Start the "flies" effect
@@ -139,7 +149,6 @@ private:
void loadCardIdMap();
void setCurrentStackVariable();
-
uint16 _id;
// Stack resource names
@@ -152,6 +161,10 @@ private:
Common::Array<uint32> _cardIdMap;
CommandsMap _commands;
+
+ bool _mouseIsDown;
+ Common::Point _mousePosition;
+ Common::Point _mouseDragStartPosition;
};
namespace RivenStacks {