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
MouseWheel.hpp
Go to the documentation of this file.
1
7
8#ifndef GALAXY_EVENTS_MOUSEWHEEL_HPP_
9#define GALAXY_EVENTS_MOUSEWHEEL_HPP_
10
13
14namespace galaxy
15{
19 struct MouseWheel final : public Event
20 {
32 MouseWheel(const float ax, const float ay, const SDL_MouseWheelDirection dir, const float mx, const float my, const int tx, const int ty) noexcept;
33
37 float m_amount_x = 0.0f;
38
42 float m_amount_y = 0.0f;
43
48 SDL_MouseWheelDirection m_direction = SDL_MOUSEWHEEL_NORMAL;
49
53 float m_mouse_x = 0.0f;
54
58 float m_mouse_y = 0.0f;
59
63 int m_total_x = 0;
64
68 int m_total_y = 0;
69 };
70} // namespace galaxy
71
72#endif
Base type of all events.
Definition Event.hpp:17
Application.hpp galaxy.
Contains mouse wheel movement data.
float m_amount_y
The amount scrolled vertically, positive away from the user and negative toward the user.
int m_total_y
The amount scrolled vertically, accumulated to whole scroll "ticks".
int m_total_x
The amount scrolled horizontally, accumulated to whole scroll "ticks".
float m_mouse_y
Y coordinate, relative to window.
float m_mouse_x
X coordinate, relative to window.
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.
float m_amount_x
The amount scrolled horizontally, positive to the right and negative to the left.
SDL_MouseWheelDirection m_direction
When FLIPPED the values in X and Y will be opposite. Multiply by -1 to change them back.