36 inline float GetX()
const {
return m_MouseX; }
43 inline float GetY()
const {
return m_MouseY; }
53 ss <<
"MouseMovedEvent: " << m_MouseX <<
", " << m_MouseY;
61 float m_MouseX, m_MouseY;
100 ss <<
"MouseScrolledEvent: " << m_XOffset <<
", " << m_YOffset;
107 float m_XOffset, m_YOffset;
156 std::stringstream ss;
157 ss <<
"MouseButtonPressedEvent: " << m_Button;
189 std::stringstream ss;
190 ss <<
"MouseButtonReleasedEvent: " << m_Button;
#define KARMA_API
Defining Karma's API macro for storage class information.
Definition Core.h:41
This file contains the base class Event for Karma's events.
@ EventCategoryInput
Events belonging to game inputs. Input device examples include keyboard, mouse, and all that.
Definition Event.h:45
@ EventCategoryMouse
Events belonging to game movement inputs from mouse.
Definition Event.h:55
#define EVENT_CLASS_TYPE(type)
A macro for a template for Event based classes.
Definition Event.h:73
#define EVENT_CLASS_CATEGORY(category)
Macro for the routine category flags.
Definition Event.h:82
The base class of all the events for Karma.
Definition Event.h:88
float GetY() const
Getter for y coordinate.
Definition MouseEvent.h:43
std::string ToString() const override
String representation of event.
Definition MouseEvent.h:50
MouseMovedEvent(float x, float y)
Default constructor.
Definition MouseEvent.h:27
float GetX() const
Getter for x coordinate.
Definition MouseEvent.h:36