Hi all,
I'm developing and app on winXP using Ogre, OIS and CEGUI. I have the keyboard and mouse listeners implemented in a class "Input". Everything is working fine with the keys and mouse buttons, but I'm getting an error when I try to inject mouseMoved: 'relX' : is not a member of 'OIS::MouseState' and 'relY' : is not a member of 'OIS::MouseState'
ATM my listeners looks like :
// MouseListener
bool InputHandler::mouseMoved(const OIS::MouseEvent &evt) {
CEGUI::System::injectMouseMove(mMouse->getMouseState().relX, mMouse->getMouseState().relY);
return true;
}
bool InputHandler::mousePressed(const OIS::MouseEvent &evt, OIS::MouseButtonID btn) {
CEGUI::System::getSingleton().injectMouseButtonDown(convertOISMouseButtonToCegui(btn));
return true;
}
bool InputHandler::mouseReleased(const OIS::MouseEvent &evt, OIS::MouseButtonID btn) {
CEGUI::System::getSingleton().injectMouseButtonUp(convertOISMouseButtonToCegui(btn));
// just a test to see if it's working and it is.
if (convertOISMouseButtonToCegui(btn) == CEGUI::LeftButton)
m_simulation->requestStateChange(SHUTDOWN);
return true;
}
// KeyListener
bool InputHandler::keyPressed(const OIS::KeyEvent &evt) {
return true;
}
bool InputHandler::keyReleased(const OIS::KeyEvent &evt) {
if (evt.key == OIS::KC_ESCAPE)
m_simulation->requestStateChange(SHUTDOWN);
return true;
}
When I press ESC or released the left button the app quits, so, the listeners are working fine.
I'm trying to put the mouse cursos to move, but I'm getting the error.
Does anyone have some info about it?
I tried some lines of code from the demo, some topics I found in this forum also and my knowhow is not enough to understand why it works in some examples that I saw and why in my code it's not working.
Thanks all.