Rebel Fork Framework
|
#include <Urho3D/Input/Input.h>
Public Member Functions | |
void | Initialize (unsigned numButtons, unsigned numAxes, unsigned numHats) |
Initialize the number of buttons, axes and hats and set them to neutral state. | |
void | Reset () |
Reset button, axis and hat states to neutral. | |
bool | IsController () const |
unsigned | GetNumButtons () const |
unsigned | GetNumAxes () const |
unsigned | GetNumHats () const |
bool | GetButtonDown (unsigned index) const |
bool | GetButtonPress (unsigned index) const |
float | GetAxisPosition (unsigned index) const |
bool | HasAxisPosition (unsigned index) const |
int | GetHatPosition (unsigned index) const |
Public Attributes | |
SDL_Joystick * | joystick_ {} |
SDL joystick. | |
JoystickDeviceType | type_ {JOYSTICK_TYPE_UNKNOWN} |
Joystick device type. | |
SDL_JoystickID | joystickID_ {} |
SDL joystick instance ID. | |
SDL_GameController * | controller_ {} |
SDL game controller. | |
UIElement * | screenJoystick_ {} |
UI element containing the screen joystick. | |
ea::string | name_ |
Joystick name. | |
ea::vector< bool > | buttons_ |
Button up/down state. | |
ea::vector< bool > | buttonPress_ |
Button pressed on this frame. | |
ea::vector< float > | axes_ |
Axis position from -1 to 1. | |
ea::vector< bool > | validAxis_ |
Valid axis position. | |
ea::vector< int > | hats_ |
POV hat bits. | |
Input state for a joystick. @nocount
|
inline |
Return axis position.
|
inline |
Check if a button is held down.
|
inline |
Check if a button has been pressed on this frame.
|
inline |
Return hat position.
|
inline |
Return number of axes.
|
inline |
Return number of buttons.
|
inline |
Return number of hats.
|
inline |
Returns true if has valid axis position.
|
inline |
Return whether is a game controller. Game controllers will use standardized axis and button mappings.