Bundle SDL2 multimedia library for 2D graphics, input handling, audio playback, and window management. Core types: Window, Renderer, Texture, Surface, Event, and Mixer. Compile with -lib sdl2.
MouseButtonEvent
Mouse button event
Operations
GetButton #
Button that changed
method : public : GetButton() ~ MouseButtonValueReturn
| Type | Description |
|---|---|
| MouseButtonValue | changed button |
GetClicks #
Number of clicks
method : public : GetClicks() ~ IntReturn
| Type | Description |
|---|---|
| Int | 1 for single-click, 2 for double-click, etc. |
GetState #
State of the button
method : public : GetState() ~ KeyStateReturn
| Type | Description |
|---|---|
| KeyState | button state |
GetTimestamp #
Timestamp of the event
method : public : GetTimestamp() ~ IntReturn
| Type | Description |
|---|---|
| Int | event timestamp |
GetType #
Event type
method : public : GetType() ~ IntReturn
| Type | Description |
|---|---|
| Int | EventType->SDL_MOUSEBUTTONDOWN or EventType->SDL_MOUSEBUTTONUP |
GetWindowID #
Window with mouse focus, if any
method : public : GetWindowID() ~ IntReturn
| Type | Description |
|---|---|
| Int | window ID |