Re: Querying mouse wheel movements with SDL? |
Re: Querying mouse wheel movements with SDL? |
David Olofson
Guest
|
On Wednesday 18 January 2006 12:52, karx11erx wrote:
Well, just ignore the events you don't want. (Unless you're doing mouse capture, focus handling and stuff like that, you generally do that anyway.) One wheel "step" corresponds to one click on a virtual up or down button. There is no such things as a "down state" of these virtual up/down buttons, and sending down + up events back to back is as close as a button oriented API gets to emulating these zero duration clicks. The only thing wrong with it is that the zero duration isn't reliably visible through the API. You'd actually need extra code *without* these "fake" button up events, because that would make them different from all other button events. //David Olofson - Programmer, Composer, Open Source Advocate .------- http://olofson.net - Games, SDL examples -------. | http://zeespace.net - 2.5D rendering engine | | http://audiality.org - Music/audio engine | | http://eel.olofson.net - Real time scripting | '-- http://www.reologica.se - Rheology instrumentation --' |
|||||||||||||
|