Issues with AbsoluteMouse

Hey folks,



I'm guessing this issue is something that's been seen before and that there might be a well-known solution.  But looking through the javadoc and the threads here I can't find it;  maybe someone caan point me at the right resource.



I'm using an AbsoluteMouse in a game window that's not fullscreen.  I'm also using a ChaseCamera and a ThirdPersonHandler.  The ChaseCamera is configured to pan the camera only when the right mouse button is down.



So when I'm panning the camera, I get some strange behavior if the mouse cursor leaves the bounds of my game window.  The camera stops panning (not entirely surprising), but if I un-click the right mouse button while i'm outside the game window and move the mouse back in, the camera is still in "pan-around-mode."  I have to click & release the right mouse button to get out of panning mode.



And as long as i'm posting – is there as easy way to keep the cursor in frozen in place when the right mouse button is pressed (when i'm panning)?

1). could be a bug i think. it shouldn't loose the texture after a visible toggle.



3b) the transparent part of the texture should be either black (jpg) or transparent (with png's).

Then you also need to apply a BlendState with correct settings to your Quad. The Settings depend on if you use black or a alpha channel as transparency.

  - (3) Looking at other examples online, it seems that it would alternately be possible to treat the AbsoluteMouse as an "ordinary" Spatial:  texture it and add it to the rootNode of some GameState object directly, not use setHardwareCursor() method at all.  Is this way better?



Isn't this kinda a software mouse then?

with all drawbacks, like slow reacting espeically when frame ratesare low.

(enable vsync then you see how drunken it fells sometimes)

Core-Dump said:

3b) the transparent part of the texture should be either black (jpg) or transparent (with png's).
Then you also need to apply a BlendState with correct settings to your Quad. The Settings depend on if you use black or a alpha channel as transparency.


Core-Dump et al.,

I'm returning to some of the finer points of this stuff after working on other areas.  How do you apply a BlendState to a hardware cursor?  I only see how to specify a URL.

If you can't apply a BlendState, what do you have to do to use a PNG with transparency as a hardware cursor?  My PNG looks great in Window Picture Viewer, but like garbage in-game.

It seems to work fine in SimpleGame using cursor1.png from jme:


  protected void simpleInitGame() {
    display.setTitle("A Simple Test");
    Quad q = new Quad("fs", display.getWidth(), display.getHeight());
    q.setLocalTranslation(display.getWidth()/2, display.getHeight()/2, 0);
    rootNode.attachChild(q);
    TextureState ts = display.getRenderer().createTextureState();
    ts.setTexture(TextureManager.loadTexture(TestSimpleGame.class.getResource("/jmetest/data/images/Monkey.png")));
    q.setRenderState(ts);
    rootNode.setRenderQueueMode(Renderer.QUEUE_ORTHO);
   
    MouseInput.get().setCursorVisible(true);
    MouseInput.get().setHardwareCursor(TestSimpleGame.class.getResource("/jmetest/data/cursor/cursor1.png"));
  }