Strange mouse problem

nord666

26-08-2008 03:01:16

Hello,

The mouse is restricted in a 75 px * 75 px(it's an approximation). I can't move it further than 75px to the right and same for the bottom.

Here is the only code that I use about MyGUI(for now) :
mGui = new MyGUI::Gui();
mGui->initialise(mRoot->getAutoCreatedWindow());


It's a really strange bug! :(

I hope someone will be able to help me!

klumhru

26-08-2008 16:26:20

answered here:

http://www.ogre3d.org/phpBB2addons/viewtopic.php?t=7551

void SomeWindowEventListener::windowResized(Ogre::RenderWindow* rw)
{
mWidth = rw->getWidth();
mHeight = rw->getHeight();

if (mMouse) {
const OIS::MouseState &ms = mMouse->getMouseState();
ms.width = (int)mWidth;
ms.height = (int)mHeight;
}
}


you can run that code whenever your window is rezised through some means or use WindowEventUtils to add a class that inherits WindowEventListener and has a definition of windowResized per above.

nord666

27-08-2008 18:10:13

i'll try it and thx a lot!