getting the mouse wheel in SDL?
hi, pretty simple question. does anyone know how to detect a mouse wheel up / down event? id like to know how to get it directly if thats possible, ie not while polling for input. cant find any info for this on the docs, im not sure if it even exist's. thanks for any help.
FTA, my 2D futuristic action MMORPG
Hiya, you will use the SDL_MouseButtonEvent. In addition to the
SDL_BUTTON_LEFT, SDL_BUTTON_MIDDLE, SDL_BUTTON_RIGHT
flags you can also use
SDL_BUTTON_WHEELUP, SDL_BUTTON_WHEELDOWN
Hope that helps.
SDL Doc
SDL_BUTTON_LEFT, SDL_BUTTON_MIDDLE, SDL_BUTTON_RIGHT
flags you can also use
SDL_BUTTON_WHEELUP, SDL_BUTTON_WHEELDOWN
Hope that helps.
SDL Doc
Steven Bradley .:Personal Journal:. .:WEBPLATES:. .:CGP Beginners Group:. "Time is our most precious resource yet it is the resource we most often waste." ~ Dr. R.M. Powell
thanks... but it seems like i have to do this in the polling for input. is there anyway to grab if they have been pressed directly? thanks
FTA, my 2D futuristic action MMORPG
If you're just wanting to inspect the current state of the buttons, that's a different concept to events, which signal changes of state.
http://sdldoc.csn.ul.ie/sdlgetmousestate.php
Try looking for buttons 4 and 5, perhaps.
http://sdldoc.csn.ul.ie/sdlgetmousestate.php
Try looking for buttons 4 and 5, perhaps.
thanks for the reply. actually, that was the first thing i tried. 4 and 5 dont seem to do anything. thanks anyway though.
FTA, my 2D futuristic action MMORPG
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement
Recommended Tutorials
Advertisement