Hello everyone,
recently I've come accross a problem with a gui part of jme3.
I was trying to create a gui screen using this peace of code:
NiftyJmeDisplay niftyDisplay = new NiftyJmeDisplay(assetManager, inputManager, audioRenderer, guiViewPort);
Nifty nifty = niftyDisplay.getNifty();
nifty.fromXml("gui/gui.xml", "start");
// attach the nifty display to the gui view port as a processor
guiViewPort.addProcessor(niftyDisplay);
// and so on ...
The problem occurs when I try to create niftyDisplay object :|
I get the following error:
java.lang.NoSuchMethodError: de.lessvoid.nifty.Nifty.<init>(Lde/lessvoid/nifty/spi/render/RenderDevice;Lde/lessvoid/nifty/spi/sound/SoundDevice;Lde/lessvoid/nifty/spi/input/InputSystem;Lde/lessvoid/nifty/tools/TimeProvider;)V
at com.jme3.niftygui.NiftyJmeDisplay.<init>(NiftyJmeDisplay.java:42)
at pl.com.talisman.maingame.MainGame.simpleInitApp(MainGame.java:123)
at com.jme3.app.SimpleApplication.initialize(SimpleApplication.java:141)
at pl.com.talisman.maingame.MainGame.initialize(MainGame.java:73)
at com.jme3.system.lwjgl.LwjglAbstractDisplay.initInThread(LwjglAbstractDisplay.java:102)
at com.jme3.system.lwjgl.LwjglAbstractDisplay.run(LwjglAbstractDisplay.java:147)
at java.lang.Thread.run(Unknown Source)
I checked the nifty api and I found the following constructor for Nifty object:
Nifty(RenderDevice rd, SoundSystem ss, InputSystem is, TimeProvider)
while obviously jme is trying to invoke:
Nifty(RenderDevice rd, SoundDevice sd, InputSystem is, TimeProvider)
Which version of nifty is being used right now ?
I was convinced that currently jme3 uses nifty 1.1 :?
If the version is correct can anyone point my error or show me walkaround ? I suppose there are people who use nifty gui in their applications.
Best regards,
Kaelthas