"changeMouseCursor" problem (Nifty GUI)

Hello everyone.

I have a strange problem, and I don’t find what’s wrong :



I’d like to change my cursor mouse with an OnHoverEffet on a Button.

Here is my code in the “simpleInitApp”



[java]NiftyJmeDisplay niftyDisplay = new NiftyJmeDisplay(

assetManager, inputManager, audioRenderer, guiViewPort);

Nifty nifty = niftyDisplay.getNifty();

guiViewPort.addProcessor(niftyDisplay);

flyCam.setDragToRotate(true);



nifty.registerMouseCursor(“hand”, “Interface/mouse-cursor-hand.png”, 5, 4);

nifty.loadStyleFile(“nifty-default-styles.xml”);

nifty.loadControlFile(“nifty-default-controls.xml”);

createDemoScreen(nifty);

nifty.gotoScreen(“demo”);



[/java]



Next, I’m building my Screen :



[java]private static Screen createDemoScreen(final Nifty nifty) {



final CommonBuilders common = new CommonBuilders();

Screen screen = new ScreenBuilder(“demo”){

{

layer(new LayerBuilder(“layer”) {

{

childLayoutVertical();

panel(new PanelBuilder(“navigation”) {

{

width(“100%”);

height(“63px”);

backgroundColor("#5588");

childLayoutHorizontal();

style(“base-font-link”);

padding(“20px”);

control(new ButtonBuilder(“bouton_01”,“Bouton”){

{

focusable(true);

visibleToMouse();

onHoverEffect(new HoverEffectBuilder(“changeMouseCursor”) {{

effectParameter(“id”, “hand”);

}});

}

});

}

});

}

});



}

}.build(nifty);



return screen;

}[/java]



Problem: the mouse doesn’t change at all.

Can you help me please? Google didn’t :wink:

Changing mouse cursor isn’t supported by jME3 (yet)

Ok!

Thank you for you quick answer :slight_smile:

oh noooooooooo



i want to change my cursor aswell :confused:

still?

In the 4 years since this topic was last idle… someone submitted cursor support. I can’t remember if it’s just a plugin or included in core… but you could look in the plugins list in the SDK to see.