Wiki Page Content

Differences between revisions 7 and 8
Revision 7 as of 2010-10-11 05:03:34
Size: 1691
Editor: SheenaSmith
Comment: minor change
Revision 8 as of 2011-01-17 17:34:54
Size: 1620
Editor: SheenaSmith
Comment: update content - w/ Sam (in progress)
Deletions are marked like this. Additions are marked like this.
Line 6: Line 6:
A structure that contains joystick hat position change event ,,structure,, ^information^ (event.jhat.*). A structure that contains joystick hat position change event information.
Line 12: Line 12:
||Uint8||'''which'''||the joystick device index ^*the index of the joystick that reported the event*^||
||Uint8||'''hat'''||the joystick hat index ^*the index of the hat*^||
||Uint8||'''value'''||the hat position value ^*the current position of the hat*^; see [[#Remarks|Remarks]] for details||
||Uint8||'''padding1'''||^8 empty bits to total 32^???||
||Uint8||'''which'''||the index of the joystick that reported the event||
||Uint8||'''hat'''||the index of the hat that changed||
||Uint8||'''value'''||the current position of the hat; see [[#Remarks|Remarks]] for details||
Line 23: Line 22:
[[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.
Line 42: Line 45:
*<<BR>>[[SDL_JoyHatEvent]]() is a member of the [[SDL_Event]] union and is used when an event of type SDL_JOYHATMOTION is reported.

A SDL_JOYHATMOTION event occurs whenever a user moves a hat on the joystick.<<BR>>*
== Related Structures ==
 .[[SDL_JoyAxisEvent]]
 .[[SDL_JoyBallEvent]]
 .[[SDL_JoyButtonEvent]]
Line 47: Line 51:
 .[[SDL_JoystickEventState]] *
 .[[SDL_JoystickGetHat]] *
 .[[SDL_JoystickEventState]]
 .[[SDL_JoystickGetHat]]

DRAFT

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 current 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 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-

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