aboutsummaryrefslogtreecommitdiff
path: root/mwe/events/include/event.h
diff options
context:
space:
mode:
Diffstat (limited to 'mwe/events/include/event.h')
-rw-r--r--mwe/events/include/event.h13
1 files changed, 5 insertions, 8 deletions
diff --git a/mwe/events/include/event.h b/mwe/events/include/event.h
index 8968c6c..65560a1 100644
--- a/mwe/events/include/event.h
+++ b/mwe/events/include/event.h
@@ -67,15 +67,14 @@ public:
class MouseClickEvent : public Event {
public:
MouseClickEvent(int x, int y, MouseButton button);
-
+
REGISTER_EVENT_TYPE("KeyClickedEvent");
- int getX() const { return x; }
- int getY() const { return y; }
+ std::pair<int, int> getMousePosition() const;
MouseButton getButton() const { return button; }
private:
- int x;
- int y;
+ int mouseX = 0;
+ int mouseY = 0;
MouseButton button;
};
// KeyReleasedEvent class
@@ -147,9 +146,7 @@ public:
REGISTER_EVENT_TYPE(TextSubmitEvent)
- std::string getText() const {
- return text;
- }
+ std::string getText() const;
private:
std::string text;