Vesper 0.5.1
Vesper is short form for the Latin word for "Bat", as Vesper is designed to be small, lightweight, and easily handle things like particles and flocking behaviors in accordance with the nature of bats. \n It is meant to be a particle simulation, VFX editor, and CAN be used secondarily as a small game engine.
GitHub | Vesper Updates | Creator
Loading...
Searching...
No Matches
Vesper::MouseMovedEvent Class Reference

Event for registering mouse movement. More...

#include <MouseEvent.h>

Inheritance diagram for Vesper::MouseMovedEvent:
Vesper::Event

Public Member Functions

 MouseMovedEvent (float x, float y)
 Construct a MouseMovedEvent with the specified x and y coordinates.
float GetX () const
 Get the x coordinate of the mouse.
float GetY () const
 Get the y coordinate of the mouse.
std::string ToString () const override
 Convert the event to a string representation.
Public Member Functions inherited from Vesper::Event
virtual ~Event ()=default
virtual EventType GetEventType () const =0
 Get the type of the event.
virtual const char * GetName () const =0
 Get the name of the event.
virtual int GetCategoryFlags () const =0
 Get the category flags of the event.
bool IsInCategory (EventCategory category)
 Check if the event is in a specific category.

Private Attributes

float m_MouseX
float m_MouseY

Additional Inherited Members

Public Attributes inherited from Vesper::Event
bool Handled = false
 Indicates whether the event has been handled.

Detailed Description

Event for registering mouse movement.

Constructor & Destructor Documentation

◆ MouseMovedEvent()

Vesper::MouseMovedEvent::MouseMovedEvent ( float x,
float y )
inline

Construct a MouseMovedEvent with the specified x and y coordinates.

Parameters
xThe x coordinate of the mouse.
yThe y coordinate of the mouse.
24 : m_MouseX(x), m_MouseY(y) {
25 }
float m_MouseX
Definition MouseEvent.h:43
float m_MouseY
Definition MouseEvent.h:43

References m_MouseX, and m_MouseY.

Member Function Documentation

◆ GetX()

float Vesper::MouseMovedEvent::GetX ( ) const
inline

Get the x coordinate of the mouse.

28{ return m_MouseX; }

References m_MouseX.

◆ GetY()

float Vesper::MouseMovedEvent::GetY ( ) const
inline

Get the y coordinate of the mouse.

30{ return m_MouseY; }

References m_MouseY.

◆ ToString()

std::string Vesper::MouseMovedEvent::ToString ( ) const
inlineoverridevirtual

Convert the event to a string representation.

Reimplemented from Vesper::Event.

34 {
35 std::stringstream ss;
36 ss << "MouseMovedEvent: " << m_MouseX << ", " << m_MouseY;
37 return ss.str();
38 }

References m_MouseX, and m_MouseY.

Member Data Documentation

◆ m_MouseX

float Vesper::MouseMovedEvent::m_MouseX
private

Referenced by GetX(), MouseMovedEvent(), and ToString().

◆ m_MouseY

float Vesper::MouseMovedEvent::m_MouseY
private

Referenced by GetY(), MouseMovedEvent(), and ToString().


The documentation for this class was generated from the following file: