SDL_MouseButtonEvent
A structure that contains mouse button event information.
Contents
Data Fields
Uint32 |
type |
SDL_MOUSEBUTTONDOWN or SDL_MOUSEBUTTONUP |
Uint32 |
windowID |
the window with mouse focus, if any |
Uint8 |
button |
the button that changed; see Remarks for details |
Uint8 |
state |
SDL_PRESSED or SDL_RELEASED |
int |
x |
X coordinate, relative to window |
int |
y |
Y coordinate, relative to window |
Code Examples
You can add your code example here
Remarks
SDL_MouseButtonEvent is a member of the SDL_Event structure and is used when an event of type SDL_MOUSEBUTTONDOWN or SDL_MOUSEBUTTONUP is reported.
An SDL_MOUSEBUTTONDOWN or SDL_MOUSEBUTTONUP event occurs whenever a user presses or releases a button on a mouse.
button may be one of:
SDL_BUTTON_LEFT |
SDL_BUTTON_MIDDLE |
SDL_BUTTON_RIGHT |
SDL_BUTTON_X1 |
SDL_BUTTON_X2 |
Related Enumerations
Related Structures