Added support for double-clicks, through a new "clicks" field in the mouse button event.

This commit is contained in:
Sam Lantinga 2013-12-23 12:17:52 -08:00
parent a78645c99d
commit 11fc41fde2
5 changed files with 75 additions and 5 deletions

View file

@ -239,8 +239,8 @@ typedef struct SDL_MouseButtonEvent
Uint32 which; /**< The mouse instance id, or SDL_TOUCH_MOUSEID */
Uint8 button; /**< The mouse button index */
Uint8 state; /**< ::SDL_PRESSED or ::SDL_RELEASED */
Uint8 clicks; /**< 1 for single-click, 2 for double-click, etc. */
Uint8 padding1;
Uint8 padding2;
Sint32 x; /**< X coordinate, relative to window */
Sint32 y; /**< Y coordinate, relative to window */
} SDL_MouseButtonEvent;