|
Size: 1620
Comment: update content - w/ Sam (in progress)
|
Size: 1265
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 14: | Line 13: |
| ||Uint8||'''value'''||the current position of the hat; see [[#Remarks|Remarks]] for details|| | ||Uint8||'''value'''||the new position of the hat; see [[#Remarks|Remarks]] for details|| |
| Line 26: | Line 25: |
| '''value''' may be any of the following ^*a bitwise OR'd combination of* any of *the following*^: ||SDL_HAT_LEFTUP|| ||SDL_HAT_UP|| ||SDL_HAT_RIGHTUP|| ||SDL_HAT_LEFT|| ||SDL_HAT_CENTERED|| ||SDL_HAT_RIGHT|| ||SDL_HAT_LEFTDOWN|| ||SDL_HAT_DOWN|| ||SDL_HAT_RIGHTDOWN|| Note that zero means the POV is centered. ''-or-'' |
'''value''' may be one of the following: |
SDL_JoyHatEvent
A structure that contains joystick hat position change event information.
Data Fields
Uint32 |
type |
SDL_JOYHATMOTION |
Uint8 |
which |
the index of the joystick that reported the event |
Uint8 |
hat |
the index of the hat that changed |
Uint8 |
value |
the new position of the hat; see Remarks for details |
Code Examples
You can add your code example here
Remarks
SDL_JoyHatEvent() is a member of the SDL_Event structure and is used when an event of type SDL_JOYHATMOTION is reported.
An SDL_JOYHATMOTION event occurs whenever a user moves a hat on the joystick.
value may be one of the following:
SDL_HAT_LEFTUP |
SDL_HAT_UP |
SDL_HAT_RIGHTUP |
||
SDL_HAT_LEFT |
SDL_HAT_CENTERED |
SDL_HAT_RIGHT |
||
SDL_HAT_LEFTDOWN |
SDL_HAT_DOWN |
SDL_HAT_RIGHTDOWN |
||
Note that zero means the POV is centered.
Related Structures
