SDL_Mouse_event


#1

Can I ask: there is any way to detect the mouse hold event?


#2

I believe SDL only handles mouse down and mouse up.

Theres 2 things you could do.
When pressed set a bool to true and when released set it to false. While its true you know its held down.

Or

Store previous and current state for mouse clicks to determine if mouse if pressed, held or released.


#3

You can also use SDL_GetMouseState() to see which mouse buttons are currently down. There’s an SDL_MOUSEMOTION event, too, if that helps what you’re trying to do.