LibGame
v0.4.0
The LG Game Engine - Copyright (C) 2024 ETMSoftware
|
Functions | |
zboolean | lg_get_mouse_state (SDL_Event event, zboolean *left_click, zboolean *right_click, int *dx, int *dy, int *dz_wheel) |
=== Mouse-related stuff ===
zboolean lg_get_mouse_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 |