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::MouseReleased Struct Referencefinal

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

#include <MouseReleased.hpp>

+ Inheritance diagram for galaxy::MouseReleased:
+ Collaboration diagram for galaxy::MouseReleased:

Public Member Functions

 MouseReleased (const float xpos, const float ypos, const int clicks, const MouseButton button) 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.
 
int m_clicks = 0
 1 for single-click, 2 for double-click, etc.
 
MouseButton m_button = MouseButton::UNKNOWN
 The mouse button index.
 

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 released event.

Definition at line 19 of file MouseReleased.hpp.

Constructor & Destructor Documentation

◆ MouseReleased()

galaxy::MouseReleased::MouseReleased ( const float xpos,
const float ypos,
const int clicks,
const MouseButton button )
noexcept

Constructor.

Parameters
xposX coordinate, relative to window.
yposY coordinate, relative to window.
clicks1 for single-click, 2 for double-click, etc.
buttonThe mouse button index.

Definition at line 12 of file MouseReleased.cpp.

Member Data Documentation

◆ m_xpos

float galaxy::MouseReleased::m_xpos = 0.0f

X coordinate, relative to window.

Definition at line 34 of file MouseReleased.hpp.

◆ m_ypos

float galaxy::MouseReleased::m_ypos = 0.0f

Y coordinate, relative to window.

Definition at line 39 of file MouseReleased.hpp.

◆ m_clicks

int galaxy::MouseReleased::m_clicks = 0

1 for single-click, 2 for double-click, etc.

Definition at line 44 of file MouseReleased.hpp.

◆ m_button

MouseButton galaxy::MouseReleased::m_button = MouseButton::UNKNOWN

The mouse button index.

Definition at line 49 of file MouseReleased.hpp.


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