Reputation: 95
Im making a 2D topdown RTS and I need to make a selection box which will have 4 parameters(x,y of top right corner and x,y of bottom down corner). Can anybody tell me when is the SDL_MOUSEBUTTONUP fired??
Upvotes: 0
Views: 573
Reputation: 5290
It literally says in the documentation.
*SDL_MouseButtonEvent is a member of the SDL_Event union and is used when an event of type SDL_MOUSEBUTTONDOWN or SDL_MOUSEBUTTONUP is reported. You would access it through the event's button field.
An SDL_MOUSEBUTTONDOWN or SDL_MOUSEBUTTONUP event occurs whenever a user presses or releases a button on a mouse. *
Upvotes: 2