[SDL] Detecting Double Clicks
tennies at uwplatt.edu
Wed Jan 16 11:24:02 PST 2002
Okay. I said we'd do this like Borland did in the VCL, which I'm sure most
people probably haven't used, but I did explain it.
There would still be a mouse down and mouse up event that would be generated
the instant the mouse button went down or up. A click or double-click event
would be generated later. This would be useful specifically for point and
click games (like a RTS... like Starcraft). Basically, it would end up as a
totally new event type.
----- Original Message -----
From: "Jimmy" <jimmy at jimmysworld.org>
To: "SDL Mailing List" <sdl at libsdl.org>
Sent: Wednesday, January 16, 2002 12:42 PM
Subject: Re: Re: [SDL] Detecting Double Clicks
> I have to agree here. There are all sorts of nasty things that this
> would cause if added. Any games that want better isolation of the mouse
> would be in trouble. Even if you interpreted a double click as two
> individual clicks, you'd lose the location of the first (or second)
> click, and there'd be a latency issue because the system would never be
> able to send ANY mouse event until the delay specified for a doubleclick
> had expired because you couldn't send a single until you were sure it
> wasn't a double. This would be especially awful if the doubleclick
> delay is high.
> On Tue, 2002-01-15 at 16:56, Neil Griffiths wrote:
> > Hiya,
> > DB> Or if the proposed method of generating single click and double
> > DB> events seems better, perhaps SDL could have a default value, which
> > DB> be set automatically if the OS supports it and/or set by the
> > The idea of SDL is that it's platform independent, so having parts
> > which work on only some OS' is not a good idea.
> > I'm also against having double click events anyway. If you're creating
> > a game and you use mouse buttons as input, you may fire away happily.
> > You want to be looking for only one event, not two.
> > Is it REALLY so hard to get the current time when a button is clicked
> > once and then once more when it's clicked again, then compare the two?
> > Neil.
> > _______________________________________________
> > SDL mailing list
> > SDL at libsdl.org
> > http://www.libsdl.org/mailman/listinfo/sdl
> End of Rant.
> SDL mailing list
> SDL at libsdl.org
More information about the SDL