|
Size: 1265
Comment: Removed padding, see SGStructures page.
|
← Revision 14 as of 2014-12-06 12:24:54 ⇥
Size: 1271
Comment: Fixed description for which parameter (Feedback 2014-12-05).
|
| Deletions are marked like this. | Additions are marked like this. |
| Line 12: | Line 12: |
| ||SDL_JoystickID||'''which'''||the index of the joystick that reported the event|| | ||SDL_JoystickID||'''which'''||the instance id of the joystick that reported the event|| |
SDL_JoyButtonEvent
A structure that contains joystick button event information.
Contents
Data Fields
Uint32 |
type |
the event type; SDL_JOYBUTTONDOWN or SDL_JOYBUTTONUP |
Uint32 |
timestamp |
timestamp of the event |
SDL_JoystickID |
which |
the instance id of the joystick that reported the event |
Uint8 |
button |
the index of the button that changed |
Uint8 |
state |
the state of the button; SDL_PRESSED or SDL_RELEASED |
Code Examples
You can add your code example here
Remarks
SDL_JoyButtonEvent is a member of the SDL_Event union and is used when an event of type SDL_JOYBUTTONDOWN or SDL_JOYBUTTONUP is reported. You would access it through the event's jbutton field.
An SDL_JOYBUTTONDOWN or SDL_JOYBUTTONUP event occurs whenever a user presses or releases a button on a joystick.
Related Enumerations
Related Structures
