ASGE
3.2.0
Simple Game Framework in GL
|
#include <Gamepad.hpp>
Public Member Functions | |
GamePadData (int id, const char *gamepad_name, const float axis_data[6], const unsigned char button_state[15]) noexcept | |
GamePadData (GamePadData &&rhs)=default | |
GamePadData (const GamePadData &rhs)=default | |
GamePadData & | operator= (GamePadData &&rhs)=default |
GamePadData & | operator= (const GamePadData &rhs)=default |
Public Attributes | |
float | axis [6] { 0.0F } |
unsigned char | buttons [15] { 0 } |
const char * | name { nullptr } |
int | idx { 0 } |
bool | is_connected { false } |
Data for connected gamepad.
Data that represents the current state of a connected game pad. Includes the number of axis and buttons along with their current state. If a gamepad is not connected then the status of is_connected will be false.
Usage:
Definition at line 48 of file Gamepad.hpp.
|
inlinenoexcept |
Default constructor.
id | The index of the controller. |
gamepad_name | The name of the controller. |
axis_data | The value of each axis. |
button_state | The state of each button. |
Definition at line 57 of file Gamepad.hpp.
float ASGE::GamePadData::axis[6] { 0.0F } |
State of axis. The value of each axis
Definition at line 75 of file Gamepad.hpp.
unsigned char ASGE::GamePadData::buttons[15] { 0 } |
State of buttons. The value of each button
Definition at line 76 of file Gamepad.hpp.
int ASGE::GamePadData::idx { 0 } |
Index. The index for this controller
Definition at line 78 of file Gamepad.hpp.
bool ASGE::GamePadData::is_connected { false } |
Is controller connected?
Definition at line 79 of file Gamepad.hpp.
const char* ASGE::GamePadData::name { nullptr } |
Name. The name of the connected controller
Definition at line 77 of file Gamepad.hpp.