DRAFT |
SDL_JoyBallEvent
A structure that contains joystick trackball motion event structure information (event.jball.*).
Data Fields
Uint32 |
type |
SDL_JOYBALLMOTION |
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 |
|
Uint8 |
padding2 |
|
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()??? union and is used when an event of type SDL_JOYBALLMOTION is reported.
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 orange
. Trackballs only return relative motion, green
this is the change in position on the ball since it was last polled (last cycle of the event loop) green
and it is stored in xrel and yrel.
*
