Mouse pointer isn't moving at all...


03-07-2008 15:04:42

Hi guys, i'm new to MyGUI and got a little problem (well 2 to be honest)

i did everything needed on the Frame Listener (mGui->injectFrameEntered(evt.timeSinceLastFrame); on the FrameStarted, mGui->injectMouseMove(arg) for mousemoved and others).

but when it launch the mouse is showed, but still not moving (look at the screen shot)

if you want some code i'll post it as soon as i can! (can't access my main comp)


03-07-2008 15:35:05

code would indeed help alot.

Can you check if the injection is actually reached (put a std::cerr << "blort" << std::endl or smt before it, or use a debugger)? Possibly its in a conditional and isn't reached or maybe you put the injections in the mouseMove method which is overridden in a subclass (for exaple in my application I have 3 mousemoved methoids, and only one (the one of the lowest subclass) gets called.


03-07-2008 22:01:10

nice, it wasn't this but it still helped a lot! It forced me to read all the code and then, i saw the problem, it was pretty dumb, in fact, framestarted was scanning the keyboard with a switch then, the mouse was ignored...

but now i got another problem ( :? ), the mouse can't go farther than this (maybe someone else got this problem once):

can you help me on this one? (sorry for the annoyance)


03-07-2008 23:20:01

This is not MyGUI approach, it's OIS. You nedd say OIS your screen size.void BasisManager::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;


04-07-2008 00:46:46

Nice! thank you very much ! now it work like a charm !