aboutsummaryrefslogtreecommitdiff
path: root/src/crepe/system/InputSystem.h
diff options
context:
space:
mode:
authorWBoerenkamps <wrj.boerenkamps@student.avans.nl>2024-12-19 09:31:59 +0100
committerWBoerenkamps <wrj.boerenkamps@student.avans.nl>2024-12-19 09:31:59 +0100
commit6c5e55a1c7d7de3f518fa12f2316e871ad4d9dd2 (patch)
treea86d846ec2ee1bc97e17297e7155ed4d35b04b5a /src/crepe/system/InputSystem.h
parentee6bf92b661a3762fa3886409641958f32544f88 (diff)
parentd8f1e161b0c98baa7dde287c484529a8b1291626 (diff)
merge with master
Diffstat (limited to 'src/crepe/system/InputSystem.h')
-rw-r--r--src/crepe/system/InputSystem.h33
1 files changed, 33 insertions, 0 deletions
diff --git a/src/crepe/system/InputSystem.h b/src/crepe/system/InputSystem.h
index 9ab76f6..fbcf3f6 100644
--- a/src/crepe/system/InputSystem.h
+++ b/src/crepe/system/InputSystem.h
@@ -3,6 +3,8 @@
#include "../api/Config.h"
#include "../facade/EventData.h"
+#include "../api/Event.h"
+#include "../api/Metadata.h"
#include "../types.h"
#include "../util/OptionalRef.h"
@@ -13,6 +15,37 @@ namespace crepe {
class Camera;
class Button;
class Transform;
+//! Event triggered when a button is clicked
+class ButtonPressEvent : public Event {
+public:
+ //! Metadata of the button.
+ const Metadata & metadata;
+ /**
+ * \param metadata Metadata of the button pressed
+ */
+ ButtonPressEvent(const Metadata & metadata) : metadata(metadata){};
+};
+//! Event triggered when the mouse enters a button
+class ButtonEnterEvent : public Event {
+public:
+ //! Metadata of the button.
+ const Metadata & metadata;
+ /**
+ * \param metadata Metadata of the button pressed
+ */
+ ButtonEnterEvent(const Metadata & metadata) : metadata(metadata){};
+};
+//! Event triggered when the mouse leaves a button
+class ButtonExitEvent : public Event {
+public:
+ //! Metadata of the button.
+ const Metadata & metadata;
+ /**
+ * \param metadata Metadata of the button pressed
+ */
+ ButtonExitEvent(const Metadata & metadata) : metadata(metadata){};
+};
+
/**
* \brief Handles the processing of input events created by SDLContext
*