![]() |
LibGame
v0.4.0
The LG Game Engine - Copyright (C) 2024-2025 ETMSoftware
|
Functions | |
zboolean | lg_mouse_get_state (SDL_Event event, zboolean *left_click, zboolean *right_click, int *dx, int *dy, int *dz_wheel) |
int | lg_mouse_override_delta_threshold (int new_threshold) |
=== Mouse-related stuff ===
zboolean lg_mouse_get_state | ( | SDL_Event | event, |
zboolean * | left_click, | ||
zboolean * | right_click, | ||
int * | dx, | ||
int * | dy, | ||
int * | dz_wheel | ||
) |
Get mouse inputs: left/right click, delta x/y since last call IF left or right button is pressed, wheel actions since last call
=== This is the func you can/should use to get mouse inputs inside the game main loop ===
Does NOT invoke SDL_PollEvent()
event | A SDL_Event |
left_click | Pointer to zboolean that will get left clicks |
right_click | Pointer to zboolean that will get right clicks |
dx | Pointer to int that will get delta x since last call |
dy | Pointer to int that will get delta y since last call |
dz_wheel | Pointer to int that will get delta z (wheel forward/backward motions) since last call |
int lg_mouse_override_delta_threshold | ( | int | new_threshold | ) |
Override mouse delta threshold
Default value is MOUSE_DELTA_THRESHOLD defined in lg_mouse.h
new_threshold |