SDL Wiki

SDL_JoyButtonEvent

A structure that contains joystick button event information.

Data Fields

Uint32

type

the event type; SDL_EVENT_JOYSTICK_BUTTON_DOWN or SDL_EVENT_JOYSTICK_BUTTON_UP

Uint32

timestamp

timestamp of the event

SDL_JoystickID

which

the instance id of the joystick that reported the event

Uint8

button

the index of the button that changed

Uint8

state

the state of the button; SDL_PRESSED or SDL_RELEASED

Remarks

SDL_JoyButtonEvent is a member of the SDL_Event union and is used when an event of type SDL_EVENT_JOYSTICK_BUTTON_DOWN or SDL_EVENT_JOYSTICK_BUTTON_UP is reported. You would access it through the event's jbutton field.

An SDL_EVENT_JOYSTICK_BUTTON_DOWN or SDL_EVENT_JOYSTICK_BUTTON_UP event occurs whenever a user presses or releases a button on a joystick.

SDL_EventType
SDL_Event
SDL_JoyAxisEvent
SDL_JoyHatEvent
SDL_JoystickEventState
SDL_GetJoystickButton

CategoryStruct, CategoryEvents


[ edit | delete | history | feedback | raw ]

[ front page | index | search | recent changes | git repo | offline html ]

All wiki content is licensed under Creative Commons Attribution 4.0 International (CC BY 4.0).
Wiki powered by ghwikipp.