|
gKit2 light
|
Public Member Functions | |
| Gamepads () | |
| constructeur par defaut. More... | |
| bool | create () |
| detection des pads connectes. More... | |
| void | release () |
| void | update () |
| lecture des infos des pads connectes. More... | |
| int | pads () |
| renvoie le nombre de game controllers. More... | |
| Gamepad & | pad (const unsigned int index) |
| renvoie un game controller. More... | |
| int | button (const unsigned int index, const SDL_GameControllerButton b) |
| renvoie l'etat d'un button d'un controlleur. cf la doc SDL2 pour les codes. More... | |
| void | clear_button (const unsigned int index, const SDL_GameControllerButton b) |
| desactive un button d'un controlleur. More... | |
| float | axis (const unsigned int index, const SDL_GameControllerAxis a) |
| renvoie la position d'un axe d'un controlleur. More... | |
| void | clear_axis (const unsigned int index, const SDL_GameControllerAxis a) |
| re-initialise la position d'un axe d'un controlleur. More... | |
Protected Attributes | |
| std::vector< Gamepad > | m_pads |
Definition at line 34 of file gamepads.h.
| Gamepads::Gamepads | ( | ) |
| bool Gamepads::create | ( | ) |
detection des pads connectes.
Definition at line 10 of file gamepads.cpp.
| void Gamepads::update | ( | ) |
lecture des infos des pads connectes.
Definition at line 56 of file gamepads.cpp.
| int Gamepads::pads | ( | ) |
renvoie le nombre de game controllers.
Definition at line 97 of file gamepads.cpp.
| Gamepad & Gamepads::pad | ( | const unsigned int | index | ) |
renvoie un game controller.
Definition at line 102 of file gamepads.cpp.
| int Gamepads::button | ( | const unsigned int | index, |
| const SDL_GameControllerButton | b | ||
| ) |
renvoie l'etat d'un button d'un controlleur. cf la doc SDL2 pour les codes.
Definition at line 108 of file gamepads.cpp.
| void Gamepads::clear_button | ( | const unsigned int | index, |
| const SDL_GameControllerButton | b | ||
| ) |
desactive un button d'un controlleur.
Definition at line 113 of file gamepads.cpp.
| float Gamepads::axis | ( | const unsigned int | index, |
| const SDL_GameControllerAxis | a | ||
| ) |
renvoie la position d'un axe d'un controlleur.
Definition at line 118 of file gamepads.cpp.
| void Gamepads::clear_axis | ( | const unsigned int | index, |
| const SDL_GameControllerAxis | a | ||
| ) |
re-initialise la position d'un axe d'un controlleur.
Definition at line 123 of file gamepads.cpp.