mouseWheel how to?

PueloGames

25-02-2008 07:27:38

how to zoom with mouse wheel?
this is the code:

myListener.h
...
bool PoolListener::mouseMoved(const OIS::MouseEvent &arg)
{
mGUIManager->injectMouseMove( arg.state.X.rel, arg.state.Y.rel);
mGUIManager->injectMouseWheelChange(arg.state.Z.rel);
return true;
}
...

game.h
...
mSheet->addEventHandler(QuickGUI::Widget::EVENT_MOUSE_WHEEL,&Pool::zoom,this);
...
...
void Pool::zoom(const QuickGUI::EventArgs& args)
{
mCamera->move(Ogre::Vector3(mCamera->getRealDirection().x,mCamera->getRealDirection().y+1,mCamera->getRealDirection().z));
}
...

the zoom always move when i move the mouse and the wheel.
thanks

kungfoomasta

25-02-2008 17:53:36

I haven't worked with scrolling too much, it might need a fix or so. You can always bypass the GUI scrolling using OIS handlers directly until I start working with it. Its not a lot of work for me, but I do have to make time for it..

PueloGames

01-03-2008 07:00:44

no problem, i can wait,
thanks so much!