Wiki Page Content

Differences between revisions 7 and 8
Revision 7 as of 2010-10-11 04:59:02
Size: 1703
Editor: SheenaSmith
Comment: minor change
Revision 8 as of 2011-01-17 17:24:32
Size: 1250
Editor: SheenaSmith
Comment: update content - w/ Sam
Deletions are marked like this. Additions are marked like this.
Line 6: Line 6:
A structure that contains joystick trackball motion event ,,structure,, ^information^ (event.jball.*). A structure that contains joystick trackball motion event information.
Line 12: Line 12:
||Uint8||'''which'''||the joystick device index ^*the index of the joystick that reported the event*^||
||Uint8||'''ball'''||the joystick trackball index ^*the index of the trackball*^||
||Uint8||'''padding1'''||^8 empty bits to total 32^???||
||Uint8||'''padding2'''||^8 empty bits to total 32^???||
||Uint8||'''which'''||the index of the joystick that reported the event||
||Uint8||'''ball'''||the index of the trackball that changed||
Line 25: Line 23:
*<<BR>>[[SDL_JoyBallEvent]]() is a member of the [[SDL_Event]] union and is used when an event of type SDL_JOYBALLMOTION is reported. [[SDL_JoyBallEvent]] is a member of the [[SDL_Event]] structure and is used when an event of type SDL_JOYBALLMOTION is reported.
Line 27: Line 25:
A SDL_JOYBALLMOTION event occurs when a user moves a trackball on the joystick. ,,The field '''which''' is the index of the joystick that reported the event and '''ball''' is the index of the trackball,, <<Color2(orange,(for a more detailed explanation see the Joystick section))>>. Trackballs only return relative motion, <<Color2(green,suggest a hyphen here instead of a comma)>> this is the change in position on the ball since it was last polled (last cycle of the event loop) <<Color2(green,suggest a hyphen here)>> and it is stored in '''xrel''' and '''yrel'''.<<BR>>* An SDL_JOYBALLMOTION event occurs when a user moves a trackball on the joystick.

Trackballs only return relative motion. This is the change in position of the ball since it was last polled (last cycle of the event loop).

== Related Structures ==
 .[[SDL_JoyAxisEvent]]
 .[[SDL_JoyButtonEvent]]
 .[[SDL_JoyHatEvent]]

DRAFT

SDL_JoyBallEvent

A structure that contains joystick trackball motion event information.

Data Fields

Uint32

type

SDL_JOYBALLMOTION

Uint8

which

the index of the joystick that reported the event

Uint8

ball

the index of the trackball that changed

int

xrel

the relative motion in the X direction

int

yrel

the relative motion in the Y direction

Code Examples

You can add your code example here

Remarks

SDL_JoyBallEvent is a member of the SDL_Event structure and is used when an event of type SDL_JOYBALLMOTION is reported.

An SDL_JOYBALLMOTION event occurs when a user moves a trackball on the joystick.

Trackballs only return relative motion. This is the change in position of the ball since it was last polled (last cycle of the event loop).


CategoryStruct, CategoryEvents

None: SDL_JoyBallEvent (last edited 2014-12-06 12:24:15 by PhilippWiesemann)

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