aboutsummaryrefslogtreecommitdiff
path: root/src/crepe/api/Event.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/crepe/api/Event.h')
-rw-r--r--src/crepe/api/Event.h57
1 files changed, 57 insertions, 0 deletions
diff --git a/src/crepe/api/Event.h b/src/crepe/api/Event.h
new file mode 100644
index 0000000..cffa5da
--- /dev/null
+++ b/src/crepe/api/Event.h
@@ -0,0 +1,57 @@
+#pragma once
+#include "KeyCodes.h"
+#include <iostream>
+#include <string>
+#include <typeindex>
+
+class Event {
+public:
+ bool handled = false;
+};
+
+class KeyPressEvent : public Event {
+public:
+ int repeat = 0;
+ Keycode key = Keycode::None;
+};
+
+class KeyReleaseEvent : public Event {
+public:
+ Keycode key = Keycode::None;
+};
+
+class MousePressEvent : public Event {
+public:
+ int mouse_x = 0;
+ int mouse_y = 0;
+ MouseButton button;
+};
+
+class MouseClickEvent : public Event {
+public:
+ int mouse_x = 0;
+ int mouse_y = 0;
+ MouseButton button;
+};
+class MouseReleaseEvent : public Event {
+public:
+ int mouse_x = 0;
+ int mouse_y = 0;
+ MouseButton button = MouseButton::None;
+};
+class MouseMoveEvent : public Event {
+public:
+ int mouse_x = 0;
+ int mouse_y = 0;
+};
+class CollisionEvent : public Event {
+public:
+ //Collision collisionData;
+};
+class TextSubmitEvent : public Event {
+public:
+ std::string text;
+};
+class ShutDownEvent : public Event {
+public:
+};