aboutsummaryrefslogtreecommitdiff
path: root/src/crepe/api/Event.h
diff options
context:
space:
mode:
authorWBoerenkamps <wrj.boerenkamps@student.avans.nl>2024-11-18 16:55:21 +0100
committerWBoerenkamps <wrj.boerenkamps@student.avans.nl>2024-11-18 16:55:21 +0100
commit92e83ded2b6afb26082d7661c28af1d9d4e950a2 (patch)
treef03fe4f0f19efb4a96d79615d98e2af501550f00 /src/crepe/api/Event.h
parent0e8fcca228e4a55c9553afc5dfed3a38f4c53a91 (diff)
added mouse and key event triggering
Diffstat (limited to 'src/crepe/api/Event.h')
-rw-r--r--src/crepe/api/Event.h16
1 files changed, 16 insertions, 0 deletions
diff --git a/src/crepe/api/Event.h b/src/crepe/api/Event.h
index d5ddf0a..ef6a791 100644
--- a/src/crepe/api/Event.h
+++ b/src/crepe/api/Event.h
@@ -87,6 +87,10 @@ public:
//! Y-coordinate of the mouse position at the time of the event.
int mouse_y = 0;
+ // Relative movement in x
+ int rel_x;
+ // Relative movement in y
+ int rel_y;
};
/**
@@ -113,3 +117,15 @@ public:
class ShutDownEvent : public Event {
public:
};
+
+class MouseScrollEvent : public Event {
+public:
+ //! X-coordinate of the mouse position at the time of the event.
+ int scroll_x = 0;
+
+ //! Y-coordinate of the mouse position at the time of the event.
+ int scroll_y = 0;
+
+ int direction = 0;
+};
+