SPARK  0.1.0
A general purpose game engine written in C++.
Loading...
Searching...
No Matches
spark::events::MouseMovedEvent Class Referencefinal

A class representing a mouse moved event. More...

#include <MouseEvents.h>

Inheritance diagram for spark::events::MouseMovedEvent:
spark::events::Event spark::rtti::HasRtti

Public Member Functions

 MouseMovedEvent (int x, int y)
 Instantiates a new MouseMovedEvent for the given mouse position.
 
int x () const
 Gets the x position of the mouse.
 
int y () const
 Gets the y position of the mouse.
 
- Public Member Functions inherited from spark::events::Event
 Event (const Event &other)=default
 
 Event (Event &&other) noexcept=default
 
Eventoperator= (const Event &other)=default
 
Eventoperator= (Event &&other) noexcept=default
 
virtual EventType eventType () const =0
 Gets the type of the event.
 
virtual int eventCategoryFlags () const =0
 Gets the category flags of the event.
 
bool isInCategory (const EventCategory &category) const
 Checks if the event is in the specified category.
 
- Public Member Functions inherited from spark::rtti::HasRtti
 HasRtti (const HasRtti &other)=default
 
 HasRtti (HasRtti &&other) noexcept=default
 
HasRttioperator= (const HasRtti &other)=default
 
HasRttioperator= (HasRtti &&other) noexcept=default
 
virtual RttiBaserttiInstance () const =0
 

Additional Inherited Members

- Public Attributes inherited from spark::events::Event
bool handled = false
 

Detailed Description

A class representing a mouse moved event.

Constructor & Destructor Documentation

◆ MouseMovedEvent()

spark::events::MouseMovedEvent::MouseMovedEvent ( int x,
int y )
explicit

Instantiates a new MouseMovedEvent for the given mouse position.

Parameters
xThe x position of the mouse.
yThe y position of the mouse.

Member Function Documentation

◆ x()

int spark::events::MouseMovedEvent::x ( ) const
nodiscard

Gets the x position of the mouse.

Returns
An int representing the x position of the mouse.

◆ y()

int spark::events::MouseMovedEvent::y ( ) const
nodiscard

Gets the y position of the mouse.

Returns
An int representing the y position of the mouse.