[SDL] Re: Mouse Wheel events...
David Ho
David_Ho at eerise.com.tw
Sat Mar 22 11:48:27 PST 2003
Replace the line in your XF86Config file
Option "Protocol" "PS2" with
Option "Protocol" "IMPS2"
and add this line:
Optiont "ZAxisMapping" "4 5"
> Under what events are SDL_BUTTON_WHEELUP & SDL_BUTTON_WHEELDOWN
> generated? Is is the SDL_MOUSEBUTTONDOWN event? If so, How do you know
> how many scroll clicks have occured and also how do you detect the Mouse
> Wheel being clicked?
> Thanks,
A WHEELUP action will generate two events, an SDL_MOUSEDOWN followed by an
SDL_MOUSEUP.
Each time an event happens, you should check if it is a
(event.type == SDL_MOUSEDOWN && event.button.button == SDL_BUTTON_WHELUP)
event.
If it is, then a wheel up action was made.
More information about the SDL
mailing list