i know that OIS::MB_Left will respond to the left moust button event. if i want to respond to mouse wheel, what's state? I also try OIS::MB_MIDDLE. it didn't work. and if i scrool the wheel, how i decide whether i scrool down or up the wheel and then enlarge or descream the view?
Could be wrong, I only just wrote this code, but I'm basing it on some stuff I found online (don't have the URL any more, sorry):
this is for unbuffered input:
newZRel = Ogre::Real(mInputMgr->getMouse()->getMouseState().Z.rel);
if (newZRel != 0)
I believe that the Z value of the mousestate for the inputmanager (from the wiki 'Using OIS' page's 'InputManager' class) is the scrollwheel movement. For a scrollwheel click, of course, you just want the MB_MIDDLE event:
kungfoomasta, feel free to slap me down if I'm mistaken. I haven't tested this code much yet!
I believe that's correct. The Z field is used to determine if the mouse scroll wheel has moved forward or backward.
And the MB_MIDDLE looks correct also. Should set a breakpoint and test this to be certain.