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

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

#include <MousePressed.hpp>

+ Inheritance diagram for galaxy::MousePressed:
+ Collaboration diagram for galaxy::MousePressed:

Public Member Functions

 MousePressed (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 pressed event.

Definition at line 19 of file MousePressed.hpp.

Constructor & Destructor Documentation

◆ MousePressed()

galaxy::MousePressed::MousePressed ( 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 MousePressed.cpp.

Member Data Documentation

◆ m_xpos

float galaxy::MousePressed::m_xpos = 0.0f

X coordinate, relative to window.

Definition at line 34 of file MousePressed.hpp.

◆ m_ypos

float galaxy::MousePressed::m_ypos = 0.0f

Y coordinate, relative to window.

Definition at line 39 of file MousePressed.hpp.

◆ m_clicks

int galaxy::MousePressed::m_clicks = 0

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

Definition at line 44 of file MousePressed.hpp.

◆ m_button

MouseButton galaxy::MousePressed::m_button = MouseButton::UNKNOWN

The mouse button index.

Definition at line 49 of file MousePressed.hpp.


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