From: Tobias Leich Date: Mon, 16 Nov 2009 15:11:32 +0000 (+0100) Subject: event docs X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=9be5218664cd05a23d5591d4f2c5acf71986202a;p=sdlgit%2FSDL-Site.git event docs --- diff --git a/pages/SDL-Event.html-inc b/pages/SDL-Event.html-inc index a46cabc..3b0a95b 100644 --- a/pages/SDL-Event.html-inc +++ b/pages/SDL-Event.html-inc @@ -374,66 +374,102 @@ a SDL_MOUSEBUTTONDOWN followed by a SDL_MOUSEBUTTONUP

Joystick axis events

+

A SDL_JOYAXISMOTION event occurs whenever a user moves an axis on the joystick.

jaxis_which

+

The field jaxis_which is the index of the joystick that reported the event.

jaxis_axis

+

The jaxis_axis is the index of the axis (for a more detailed explaination see the Joystick section).

jaxis_value

+

jaxis_value is the current position of the axis (range: -32768 to 32767).

Joystick button events

+

A SDL_JOYBUTTONDOWN or SDL_JOYBUTTONUP event occurs when ever a user presses +or releases a button on a joystick.

jbutton_which

+

The field jbutton_which is the index of the joystick that reported the event.

jbutton_button

+

The jbutton_button is the index of the button (for a more detailed explanation see the Joystick section).

jbutton_state

+

jbutton_state is the current state of the button which is either jbutton_SDL_PRESSED +or jbutton_SDL_RELEASED.

Joystick hat events

+

A SDL_JOYHATMOTION event occurs when ever a user moves a hat on the joystick.

jhat_which

+

The field jhat_which is the index of the joystick that reported the event.

jhat_hat

+

jhat_hat is the index of the hat (for a more detailed explanation see the Joystick section).

jhat_value

+

jhat_value is the current position of the hat. It is a bitwise OR'd combination of the following +values (whose meanings should be pretty obvious):

+ + +

The following defines are also provided:

+ +

Joystrick trackball events

+

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

jball_which

+

The field jball_which is the index of the joystick that reported the event.

jball_ball

+

jball_ball is the index of the trackball (for a more detailed explanation see the Joystick section).

jball_xrel, jball_yrel

+

Trackballs only return relative motion, this is the change in position on the ball since it was last +polled (last cycle of the event loop) and it is stored in jball_xrel and jball_yrel.

Window resize events