11#include <spdlog/fmt/fmt.h>
28 float GetX()
const {
return m_X; }
31 float GetY()
const {
return m_Y; }
34 std::string
ToString()
const override {
return fmt::format(
"{}: {}, {}",
GetName(), m_X, m_Y); }
58 std::string
ToString()
const override {
return fmt::format(
"{}: {}, {}",
GetName(), m_XOffset, m_YOffset); }
61 float m_XOffset = 0.0f;
62 float m_YOffset = 0.0f;
76 std::string
ToString()
const override {
return fmt::format(
"{}: {}",
GetName(),
static_cast<int>(m_Button)); }
93 std::string
ToString()
const override {
return fmt::format(
"{}: {}",
GetName(),
static_cast<int>(m_Button)); }
Base class of all events, with their types and categories.
Codes of the mouse buttons, independent from GLFW.
Base class of each event class, which gives the event its type and its categories.
Definition Event.h:148
const char * GetName() const
Returns the name of the type of the event, for example "KeyPressed".
Definition Event.h:112
MouseMovedEvent(float x, float y)
Creates the event with the new position of the cursor, in screen coordinates.
Definition MouseEvent.h:25
float GetY() const
Returns the vertical position of the cursor, from the top edge of the drawing area.
Definition MouseEvent.h:31
float GetX() const
Returns the horizontal position of the cursor, from the left edge of the drawing area.
Definition MouseEvent.h:28
std::string ToString() const override
Returns the event with the position, for example "MouseMoved: 640, 360.5".
Definition MouseEvent.h:34
Contains all the engine code.
MouseButton
Button of the mouse.
Definition MouseCodes.h:17