Wiki Page Content

Differences between revisions 11 and 12
Revision 11 as of 2011-01-17 17:56:39
Size: 1314
Editor: SheenaSmith
Comment: add RE
Revision 12 as of 2011-04-30 17:37:07
Size: 1378
Editor: SheenaSmith
Comment: update content - event remarks re: union (for consistency); camelcase
Deletions are marked like this. Additions are marked like this.
Line 2: Line 2:
#pragma disable-camelcase #pragma camelcase off
Line 21: Line 21:
[[SDL_JoyHatEvent]] is a member of the [[SDL_Event]] structure and is used when an event of type SDL_JOYHATMOTION is reported. [[SDL_JoyHatEvent]] is a member of the [[SDL_Event]] union and is used when an event of type SDL_JOYHATMOTION is reported.  You would access it through the event's `jhat` field.
Line 35: Line 35:
 .[[SDL_Event]]

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 union and is used when an event of type SDL_JOYHATMOTION is reported. You would access it through the event's jhat field.

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.


CategoryStruct, CategoryEvents

None: SDL_JoyHatEvent (last edited 2014-12-06 12:25:18 by PhilippWiesemann)

(Page Info.)
Feedback
Please include your contact information if you'd like to receive a reply.
Submit