|
Size: 1536
Comment: minor change
|
Size: 1044
Comment: update content - w/ Sam; remove draft
|
| Deletions are marked like this. | Additions are marked like this. |
| Line 3: | Line 3: |
| ||<tablewidth="100%" style="color: #FF0000;" :> DRAFT|| | |
| Line 6: | Line 5: |
| A structure that contains joystick button event ,,structure,, ^information^ (event.jbutton.*). | A structure that contains joystick button event information. |
| Line 12: | Line 11: |
| ||Uint8||'''which'''||the joystick device index ^*the index of the joystick that reported the event*^|| ||Uint8||'''button'''||the joystick button index ^*the index of the button*^|| ||Uint8||'''state'''||SDL_PRESSED or SDL_RELEASED ^*the current state of the button which is either SDL_PRESSED or SDL_RELEASED*^|| ||Uint8||'''padding1'''||^8 empty bits to total 32^???|| |
||Uint8||'''which'''||the index of the joystick that reported the event|| ||Uint8||'''button'''||the index of the button that changed|| ||Uint8||'''state'''||SDL_PRESSED or SDL_RELEASED|| |
| Line 23: | Line 21: |
| *<<BR>>[[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. | [[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. |
| Line 25: | Line 23: |
| An SDL_JOYBUTTONDOWN or SDL_JOYBUTTONUP event occurs whenever a user presses or releases a button on a joystick. ,,The field '''which''' is the index of the joystick that reported the event and '''button''' is the index of the button ,,<<Color2(orange,(for a more detailed explanation see the Joystick section))>>. ,,'''state''' is the current state of the button which is either SDL_PRESSED or SDL_RELEASED.,, <<BR>>* | An SDL_JOYBUTTONDOWN or SDL_JOYBUTTONUP event occurs whenever a user presses or releases a button on a joystick. == Related Structures == .[[SDL_JoyAxisEvent]] .[[SDL_JoyBallEvent]] .[[SDL_JoyHatEvent]] |
| Line 28: | Line 31: |
| .[[SDL_JoystickEventState]] * .[[SDL_JoystickGetButton]] * |
.[[SDL_JoystickEventState]] .[[SDL_JoystickGetButton]] |
SDL_JoyButtonEvent
A structure that contains joystick button event information.
Data Fields
Uint32 |
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 |
SDL_PRESSED or SDL_RELEASED |
Code Examples
You can add your code example here
Remarks
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.
An SDL_JOYBUTTONDOWN or SDL_JOYBUTTONUP event occurs whenever a user presses or releases a button on a joystick.
Related Structures
