[SDL] Detecting Double Clicks

Joe Tennies tennies at uwplatt.edu
Tue Jan 15 10:50:01 PST 2002


That was my thought, but I think that a double-click event would be a nice
thing to add to SDL 2.  Something that would check the speed value for the
given OS/WM.  I don't want to make guesses as to what the user wants for a
double click speed, and the information's already there under most OS/WM I
know of.

Could this be added Sam?  Also perhaps a single click event... the mouse
down and mouse up would still go down on every mouse button press, but a
click and double-click would be generated as well.  (Along the lines of
Borland Builder's implementation.)

-----Original Message-----
From: sdl-admin at libsdl.org [mailto:sdl-admin at libsdl.org]On Behalf Of
Michael Rich
Sent: Tuesday, January 15, 2002 11:47 AM
To: 'SDL Programming List'
Subject: [SDL] Detecting Double Clicks


How is the best way to detect double clicks?  I looked and there isn't a
specific event id for a double click (unlike say a mouse down event), so
what would be a good way to determine if the user has double clicked versus
just single clicking?  Do you set a timer and if they don't click again
within a certain threshold, do you assume its just a single click, otherwise
it would be a double click?

Michael Rich
http://www.AlphaX86.com



_______________________________________________
SDL mailing list
SDL at libsdl.org
http://www.libsdl.org/mailman/listinfo/sdl





More information about the SDL mailing list