Mouse Wheel events

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,

Dominique
http://www.DelphiGamer.com := go on, write a game instead;

Dominique Louis wrote:

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?
The mousewheel doubles as the middle mouse button.
As far as how many clicks with the mouse wheel up and down, it should
send a new event each time.

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.