galaxy 1.0.0
Real-Time C++23 Game Programming Framework. Built on data-driven design principles and agile software engineering.
Loading...
Searching...
No Matches
galaxy::MouseMoved Struct Referencefinal

Contains data relating to a mouse moved event. More...

#include <MouseMoved.hpp>

+ Inheritance diagram for galaxy::MouseMoved:
+ Collaboration diagram for galaxy::MouseMoved:

Public Member Functions

 MouseMoved (const float xpos, const float ypos, const float xrel, const float yrel) noexcept
 Constructor.
 
- Public Member Functions inherited from galaxy::Event
 Event () noexcept
 Constructor.
 
 Event (Event &&) noexcept
 Move constructor.
 
Eventoperator= (Event &&) noexcept
 Move assignment operator.
 
 Event (const Event &) noexcept
 Copy constructor.
 
Eventoperator= (const Event &) noexcept
 Copy assignment operator.
 
virtual ~Event () noexcept
 Destructor.
 
void consume () noexcept
 Mark this event as consumed.
 
bool consumed () const noexcept
 Is this event already consumed?
 

Public Attributes

float m_xpos = 0.0f
 X coordinate, relative to window.
 
float m_ypos = 0.0f
 Y coordinate, relative to window.
 
float m_xrel = 0.0f
 The relative motion in the X direction.
 
float m_yrel = 0.0f
 The relative motion in the Y direction.
 

Additional Inherited Members

- Protected Attributes inherited from galaxy::Event
bool m_handled
 Keeps track if event has been used already.
 

Detailed Description

Contains data relating to a mouse moved event.

Definition at line 18 of file MouseMoved.hpp.

Constructor & Destructor Documentation

◆ MouseMoved()

galaxy::MouseMoved::MouseMoved ( const float xpos,
const float ypos,
const float xrel,
const float yrel )
noexcept

Constructor.

Parameters
xposX coordinate, relative to window.
yposY coordinate, relative to window.
xrelThe relative motion in the X direction.
yrelThe relative motion in the Y direction.

Definition at line 12 of file MouseMoved.cpp.

Member Data Documentation

◆ m_xpos

float galaxy::MouseMoved::m_xpos = 0.0f

X coordinate, relative to window.

Definition at line 33 of file MouseMoved.hpp.

◆ m_ypos

float galaxy::MouseMoved::m_ypos = 0.0f

Y coordinate, relative to window.

Definition at line 38 of file MouseMoved.hpp.

◆ m_xrel

float galaxy::MouseMoved::m_xrel = 0.0f

The relative motion in the X direction.

Definition at line 43 of file MouseMoved.hpp.

◆ m_yrel

float galaxy::MouseMoved::m_yrel = 0.0f

The relative motion in the Y direction.

Definition at line 48 of file MouseMoved.hpp.


The documentation for this struct was generated from the following files: