Problem with AbsoulteMouse Inputhandler since v0.10

I downloaded v.10 yesterday and now i have a little problem with enabling and disabling mousehandlers.

(i.e. switching between a mouse cursor and mouselook)

So far (v0.9), the situation was as follows:

Normally, the mouse controled a mouse cursor without any mouselook (=camera is freezed)

When the middile button was hold, the cursor was freezed and instead the mouse controled the camera.

When the middile button was released, the control switched back to the cursor and camera was freezed again.

Important: the cursor resumed its movement exactely from where it was when it got freezed:

Now the Problem (post v.10 situation):

I press the middle button, the cursor is freezed, control is switched to camera. Okay.

BUT, when now releasing the button (= re-enabling the absolute mouse input handler), the cursor “jumps” to the point where it WOULD have moved if it wasn’t enabled. That’s quite uncomfortable, because most of the times, the cursor jumps far out of the screen boundaries :/.

In other words:

The mouse input handler, although disabled, seems to still “watch” the mouse movement and applies it as soon as it is re-enabled.

So, it appears that an inputhandler’s setEnabled() function only disables an AbsoluteMouse’s GUI element, but keeps its logic still enabled internally. … Or something like that … ^^

Is this intentional and i have to disable something additionaly since v0.10 (maybe some additional un-registering the handler or such…)?

OR is it a bug?

My impression is that it’s the latter, as i think setEnabled(false) should be sufficient to disable a handler.

But i don’t have much insight in input handling, especially in the v0.10 changes. So i may be wrong, of course.

In case it helps, here’s my code (although quite simple):

//Switch between mouselook and mouse cursor

if(MouseInput.get().isButtonDown(2)) {

   //relative mouse (rm) is mouse look



   game.mouseLook = true;



   //absolute mouse (am) is mouse pointer



   game.mouseLook = false;


I made a fix for some conserved events some days ago - committed.

But I think there's another important thing: AbsoluteMouse does not use deltas by default any more. You can do yourMouse.setUsingDeltas( true ) to obtain the old behaviour.

Heh, now that's a simple solution for a change.

Thank god there are still "easy problems".

Thanks very much, irrisor :slight_smile:

edit: It works - of course.