![]() |
galaxy 1.0.0
Real-Time C++23 Game Programming Framework. Built on data-driven design principles and agile software engineering.
|
Contains mouse wheel movement data. More...
#include <MouseWheel.hpp>
Inheritance diagram for galaxy::MouseWheel:
Collaboration diagram for galaxy::MouseWheel:Public Member Functions | |
| MouseWheel (const float ax, const float ay, const SDL_MouseWheelDirection dir, const float mx, const float my, const int tx, const int ty) noexcept | |
| Constructor. | |
Public Member Functions inherited from galaxy::Event | |
| Event () noexcept | |
| Constructor. | |
| Event (Event &&) noexcept | |
| Move constructor. | |
| Event & | operator= (Event &&) noexcept |
| Move assignment operator. | |
| Event (const Event &) noexcept | |
| Copy constructor. | |
| Event & | operator= (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_amount_x = 0.0f |
| The amount scrolled horizontally, positive to the right and negative to the left. | |
| float | m_amount_y = 0.0f |
| The amount scrolled vertically, positive away from the user and negative toward the user. | |
| SDL_MouseWheelDirection | m_direction = SDL_MOUSEWHEEL_NORMAL |
| When FLIPPED the values in X and Y will be opposite. Multiply by -1 to change them back. | |
| float | m_mouse_x = 0.0f |
| X coordinate, relative to window. | |
| float | m_mouse_y = 0.0f |
| Y coordinate, relative to window. | |
| int | m_total_x = 0 |
| The amount scrolled horizontally, accumulated to whole scroll "ticks". | |
| int | m_total_y = 0 |
| The amount scrolled vertically, accumulated to whole scroll "ticks". | |
Additional Inherited Members | |
Protected Attributes inherited from galaxy::Event | |
| bool | m_handled |
| Keeps track if event has been used already. | |
Contains mouse wheel movement data.
Definition at line 19 of file MouseWheel.hpp.
|
noexcept |
Constructor.
| ax | The amount scrolled horizontally, positive to the right and negative to the left. |
| ay | The amount scrolled vertically, positive away from the user and negative toward the user. |
| dir | Mousewheel direction. |
| mx | X coordinate, relative to window. |
| my | Y coordinate, relative to window. |
| tx | The amount scrolled horizontally, accumulated to whole scroll "ticks". |
| ty | The amount scrolled vertically, accumulated to whole scroll "ticks". |
Definition at line 12 of file MouseWheel.cpp.
| float galaxy::MouseWheel::m_amount_x = 0.0f |
The amount scrolled horizontally, positive to the right and negative to the left.
Definition at line 37 of file MouseWheel.hpp.
| float galaxy::MouseWheel::m_amount_y = 0.0f |
The amount scrolled vertically, positive away from the user and negative toward the user.
Definition at line 42 of file MouseWheel.hpp.
| SDL_MouseWheelDirection galaxy::MouseWheel::m_direction = SDL_MOUSEWHEEL_NORMAL |
When FLIPPED the values in X and Y will be opposite. Multiply by -1 to change them back.
Definition at line 48 of file MouseWheel.hpp.
| float galaxy::MouseWheel::m_mouse_x = 0.0f |
X coordinate, relative to window.
Definition at line 53 of file MouseWheel.hpp.
| float galaxy::MouseWheel::m_mouse_y = 0.0f |
Y coordinate, relative to window.
Definition at line 58 of file MouseWheel.hpp.
| int galaxy::MouseWheel::m_total_x = 0 |
The amount scrolled horizontally, accumulated to whole scroll "ticks".
Definition at line 63 of file MouseWheel.hpp.
| int galaxy::MouseWheel::m_total_y = 0 |
The amount scrolled vertically, accumulated to whole scroll "ticks".
Definition at line 68 of file MouseWheel.hpp.