Hello ,
i got a serious problem here , i tried to use the example from the TestNiftyGui just to see how it looks on my game.
but i got this :
[java]
26 nov. 2010 17:32:40 com.jme3.material.MaterialDef <init>
INFO: Loaded material definition: Default GUI
26 nov. 2010 17:32:40 com.jme3.app.Application handleError
GRAVE: Uncaught exception thrown in Thread[LWJGL Renderer Thread,5,main]
[/java]
Also , TestNiftyGui is working very well.
I tried to clear by comment , everything in Simpleinitapp and simpleupdate by letting only my Gui program but same problem here … i don’t understand why :
[java]
NiftyJmeDisplay niftyDisplay = new NiftyJmeDisplay(assetManager,
inputManager,
audioRenderer,
guiViewPort);
nifty.fromXml(“jme3test/niftygui/hellojme.xml”, “start”);
//Picture pic = new Picture(“HUD Picture”);
//pic.setImage(assetManager, “Textures/gui/icone.png”, true);
//pic.setPosition(settings.getWidth()/2, 0);
//guiNode.attachChild(pic);
nifty = niftyDisplay.getNifty();
guiViewPort.addProcessor(niftyDisplay);
[/java]
also i did the HUD tutorial , Pictures doesn’t show up and i think thoses 2 problem are related , help me please
Well you dont have a jme3test/niftygui/hellojme.xml in your project, try creating a new NiftyXML file and set the path of that file.
jme3test/niftygui/hellojme.xml is in my project , and i already tried a custom xml with nothing inside , it still doing this error
here’s is my custom xml code
http://pastebin.com/t1x29Hh5 <== sorry for that it seems xml doesn’t want to show up on my post
That’s how the demo did … anyway thank you normen now i got something , but i only have box without any text inside ( and i copied exactly the demo ) what’s going on ?
Pictures are still not displayed btw…
Thank you normen you are always here to help us that’s very nice from you
EDIT : i did a mistake sorry i used bad path that’s what there wasn’t text , problem solved , But Pictures are not working anyway
Uh, dude, you first try to use the nifty variable and then set it after, try exchanging lines 6 and 11.
I dont see any code to display pictures in your nifty xml file.
not in xml but in java here :
[java]
//Picture pic = new Picture(“HUD Picture”);
//pic.setImage(assetManager, “Textures/gui/icone.png”, true);
//pic.setPosition(settings.getWidth()/2, 0);
//guiNode.attachChild(pic);
[/java]
I was doing the HUD tutorial and just copied and paste. I know that the path is ok otherwise it would hang up >.<
Just use nifty.
i’ll do that thank you