|
QuasarEngine
Cross-platform 3D engine and editor
|
Sent when an axis of a gamepad moves enough. See GamepadSettings for the dead zones and the threshold. More...
#include <quasar/events/GamepadEvent.h>
Public Member Functions | |
| GamepadAxisMovedEvent (GamepadId gamepad, GamepadAxis axis, float value) | |
| Creates the event with the new value of the axis. | |
| GamepadId | GetGamepad () const |
| Returns the id of the gamepad. | |
| GamepadAxis | GetAxis () const |
| Returns the axis that moved. | |
| float | GetValue () const |
| Returns the new value of the axis: from -1 to 1 for a stick axis, from 0 to 1 for a trigger. | |
| std::string | ToString () const override |
| Returns the event with the id, the axis code and the value, for example "GamepadAxisMoved: 0, 4, 0.5". | |
| Public Member Functions inherited from Quasar::EventOf< EventType::GamepadAxisMoved, EventCategory::Input|EventCategory::Gamepad > | |
| EventType | GetType () const override |
| Returns the type of the event. | |
| EventCategory | GetCategories () const override |
| Returns all the categories of the event. | |
| Public Member Functions inherited from Quasar::Event | |
| const char * | GetName () const |
| Returns the name of the type of the event, for example "KeyPressed". | |
| bool | IsInCategory (EventCategory category) const |
| Returns true if the event belongs to the given category. | |
| bool | IsHandled () const |
| Returns true if the event was handled. | |
| void | SetHandled (bool handled) |
| Marks the event as handled, or not handled. | |
Additional Inherited Members | |
| Static Public Member Functions inherited from Quasar::EventOf< EventType::GamepadAxisMoved, EventCategory::Input|EventCategory::Gamepad > | |
| static constexpr EventType | GetStaticType () |
| Returns the type of this event class. | |
| Protected Member Functions inherited from Quasar::Event | |
| Event ()=default | |
| Creates an event that is not handled. | |
Sent when an axis of a gamepad moves enough. See GamepadSettings for the dead zones and the threshold.
|
inline |
Creates the event with the new value of the axis.
| gamepad | The id of the gamepad. |
| axis | The axis that moved. |
| value | The new value: from -1 to 1 for a stick axis, from 0 to 1 for a trigger. |
|
inlineoverridevirtual |
Returns the event with the id, the axis code and the value, for example "GamepadAxisMoved: 0, 4, 0.5".
Reimplemented from Quasar::Event.