I have been trying to ‘decode’ nifty gui for a while today. I have used Nifty alot, and really love it, but it bugs me that I have little idea of how the default controls work. I currently want to use the drag’n’drop controlls, and wanted to understand their integration before doing so. So I want to run it from source and ‘debug’ the code, to see how it is build…
I have downloaded the examples from: Index of /nifty-maven-repo/lessvoid/nifty-examples/1.3
And I have also downloaded the source for the default controls at:
Index of /nifty-maven-repo/lessvoid/nifty-default-controls/1.3
However, I cannot get the source to work, since the
are missing. I am wondering where the JmeTest example is getting these resources from, since I cannot find the classes in any of the .jar’s included in jmeTests, yet the examples run fine…
Anyone know where to find the above imports?
This is not a jME related question, jME uses its own renderers for Nifty. Just compile the core nifty classes and replace the jar files of the engine (preferably by creating a library entry in the SDK).
Well, I expected this was how it worked, and I assumed this had already been done for the JmeTest-TestNiftyExamples using the nifty-examples.jar? ( Delivered with Jme3 )
But decompiling the nifty-examples.jar delivered with jme3 produces the same problem ( and identical code to the one downloaded from nifty-gui.sourceforge ), I would have expected the renderer to have been rereferenced to a jme3 renderer, but it is still importing de.lessvoid.nifty.renderer.lwjgl.render.LwjglRenderDevice; and de.lessvoid.nifty.sound.openal.OpenALSoundDevice; and I do not see where this is declared within the jme3 .jar libraries.
Have you built nifty from source? There is a step by step guide on the nifty website explaining how.
Hey, no I have not compiled nifty myself yet.
I guess you are refering to this page: http://sourceforge.net/apps/mediawiki/nifty-gui/index.php?title=Build_from_Source
I will try that, see if it answers my questions. Cheers!
Yeah, why don’t you just use the nifty maven projects to build them :?
Be aware you might need to rebuild JME3 against the new nifty as well once you have built it. There was a change a while ago that was source code but not binary compatible.