From f2136f836f9b9e9a6a6698f7bc6fba85a27ebebf Mon Sep 17 00:00:00 2001 From: WBoerenkamps Date: Mon, 28 Oct 2024 11:34:43 +0100 Subject: iKeyListener test and iMouseListener test working --- mwe/events/include/event.h | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) (limited to 'mwe/events/include/event.h') 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 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; -- cgit v1.2.3