diff options
author | JAROWMR <jarorutjes07@gmail.com> | 2024-11-15 14:32:09 +0100 |
---|---|---|
committer | JAROWMR <jarorutjes07@gmail.com> | 2024-11-15 14:32:09 +0100 |
commit | 37c016f1d5902cf7bbfed08d13ee2bc6ef725add (patch) | |
tree | ce9de85b6d5ffd43d2e798b5310df883705f5ca8 /src/crepe/api/Event.h | |
parent | de1c6053033483c7e824f8018d75be6af424d14d (diff) | |
parent | 337a957a9e605f16287506b6afda56950e562db3 (diff) |
merge with wouter/events
Diffstat (limited to 'src/crepe/api/Event.h')
-rw-r--r-- | src/crepe/api/Event.h | 56 |
1 files changed, 56 insertions, 0 deletions
diff --git a/src/crepe/api/Event.h b/src/crepe/api/Event.h new file mode 100644 index 0000000..701ecdf --- /dev/null +++ b/src/crepe/api/Event.h @@ -0,0 +1,56 @@ +#pragma once +#include "KeyCodes.h" +#include <iostream> +#include <string> +#include <typeindex> + +class Event { +public: +}; + +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 = MouseButton::NONE; +}; + +class MouseClickEvent : public Event { +public: + int mouse_x = 0; + int mouse_y = 0; + MouseButton button = MouseButton::NONE; +}; +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: +}; |