Wiki Page Content

Differences between revisions 13 and 14
Revision 13 as of 2013-06-12 21:23:31
Size: 1324
Comment: Updated types to match SDL_events.h.
Revision 14 as of 2013-09-05 20:25:48
Size: 1689
Comment: Updated structure.
Deletions are marked like this. Additions are marked like this.
Line 11: Line 11:
||Uint32||'''timestamp'''||timestamp of the event||
Line 13: Line 14:
||<style="color: #808080;">Uint8||<style="color: #808080;">'''padding1'''||<style="color: #808080;">||
||<style="color: #808080;">Uint8||<style="color: #808080;">'''padding2'''||<style="color: #808080;">||
||<style="color: #808080;">Uint8||<style="color: #808080;">'''padding3'''||<style="color: #808080;">||

SDL_JoyBallEvent

A structure that contains joystick trackball motion event information.

Data Fields

Uint32

type

SDL_JOYBALLMOTION

Uint32

timestamp

timestamp of the event

SDL_JoystickID

which

the index of the joystick that reported the event

Uint8

ball

the index of the trackball that changed

Uint8

padding1

Uint8

padding2

Uint8

padding3

Sint16

xrel

the relative motion in the X direction

Sint16

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

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