|
Size: 1095
Comment: add RE
|
Size: 1203
Comment: update content - event remarks re: union (for consistency); camelcase; button params
|
| Deletions are marked like this. | Additions are marked like this. |
| Line 2: | Line 2: |
| #pragma disable-camelcase | #pragma camelcase off |
| Line 10: | Line 10: |
| ||Uint32||'''type'''||SDL_JOYBUTTONDOWN or SDL_JOYBUTTONUP|| | ||Uint32||'''type'''||the event type; SDL_JOYBUTTONDOWN or SDL_JOYBUTTONUP|| |
| Line 13: | Line 13: |
| ||Uint8||'''state'''||SDL_PRESSED or SDL_RELEASED|| | ||Uint8||'''state'''||the state of the button; SDL_PRESSED or SDL_RELEASED|| |
| Line 21: | Line 21: |
| [[SDL_JoyButtonEvent]] is a member of the [[SDL_Event]] structure and is used when an event of type SDL_JOYBUTTONDOWN or SDL_JOYBUTTONUP is reported. | [[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. |
| Line 29: | Line 29: |
| .[[SDL_Event]] |
SDL_JoyButtonEvent
A structure that contains joystick button event information.
Contents
Data Fields
Uint32 |
type |
the event type; SDL_JOYBUTTONDOWN or SDL_JOYBUTTONUP |
Uint8 |
which |
the index 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
