[SDL] Mouse Buttons
Kevin Meinert
kevin at vrsource.org
Fri Feb 14 09:17:02 PST 2003
the way I understand it, is that you need to check for MOUSEBUTTONUP.
PRESSED and RELEASED are simply the _current_state of the mouse, not the
event's state.
i.e. if you press down up before the event system can process. you get
two events. both events are going to list the event state -AND- the
current state.
you want to check the event state probably, which is what you have for
down, plus another case for MOUSEBUTTONUP (see the docs.)
note, the docs aren't too clear on this, so I'm just guessing based on
what I've gotton to work, and by reasoning why there would be a second
state (the PRESSED or RELEASED one) in the event structure.
basically you can ignore pressed/released unless you need the absolute
current state - but then you'll miss events.
- kevin
On Fri, 14 Feb 2003, Herbert G. Fischer wrote:
> Hi,
>
> In my little SDL app test, I have the attached code piece.
> The problem is that the RELEASE part of Mouse Button check
> appears not to be working. I'm doing something wrong?
>
> []s,
>
> Herbert
More information about the SDL
mailing list