diff options
author | Loek Le Blansch <loek@pipeframe.xyz> | 2024-11-05 16:12:47 +0100 |
---|---|---|
committer | Loek Le Blansch <loek@pipeframe.xyz> | 2024-11-05 16:12:47 +0100 |
commit | e36ea050972fcaaf3d85d672755bad4ebb2dcd80 (patch) | |
tree | 5145e0b66650eea1df301106b7d197a586be65f3 /mwe/events/src/event.cpp | |
parent | 333b07775be1ef20fdb5909672c1e4dcabec1b40 (diff) | |
parent | b770475741b7c33d57331f3139c55a3f237ad274 (diff) |
merge `master` into `loek/savemgr`
Diffstat (limited to 'mwe/events/src/event.cpp')
-rw-r--r-- | mwe/events/src/event.cpp | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/mwe/events/src/event.cpp b/mwe/events/src/event.cpp index c9201d0..0c9f3ed 100644 --- a/mwe/events/src/event.cpp +++ b/mwe/events/src/event.cpp @@ -50,3 +50,24 @@ CollisionEvent::CollisionEvent(Collision collision) Collision CollisionEvent::getCollisionData() const { return this->collisionData; } + +TextSubmitEvent::TextSubmitEvent(std::string text) + : text(text), Event("TextSubmitEvent") {} + +std::string TextSubmitEvent::getText() const { return this->text; } + +MouseReleasedEvent::MouseReleasedEvent(int x, int y, MouseButton button) + : mouseX(x), mouseY(y), button(button), Event("MouseReleased") {} +std::pair<int, int> MouseReleasedEvent::getMousePosition() const { + return {mouseX, mouseY}; +} +MouseClickEvent::MouseClickEvent(int x, int y, MouseButton button) + : mouseX(x), mouseY(y), button(button), Event("MouseClickEvent") {} +MouseMovedEvent::MouseMovedEvent(int x, int y) + : mouseX(x), mouseY(y), Event("MouseMovedEvent") {} +std::pair<int, int> MouseClickEvent::getMousePosition() const { + return {mouseX, mouseY}; +} +std::pair<int, int> MouseMovedEvent::getMousePosition() const { + return {mouseX, mouseY}; +} |