Login  Register

Re: Simple example with Nifty

Posted by elect on Nov 08, 2013; 3:47pm
URL: https://forum.jogamp.org/Simple-example-with-Nifty-tp4030529p4030541.html

gouessej wrote
Rather use JOGLNiftyRunner and NiftyTutorialJOGL:
https://github.com/void256/nifty-gui/tree/1.4/nifty-examples-jogl/src/main/java/de/lessvoid/nifty/examples/jogl

I ported NiftyGUI to JOGL 1 several years ago, I don't advise you to get outside of the "straight road". This API is easy to use when you start from existing examples but it becomes hard when you start from scratch. If you miss some initialization code, you end up with a black screen or worse.
I think void256 is really behind with the documentation, I am not blaming, I cannot even image how much work doing such a tool requires, so I totally understand the lack of updated documentation (really boring duty after you spent a lot of effort on cool stuffs)

Based on his own words, although the stable version seems to be the 1.4, he says the best source of documentation is the 1.3.2 manual

http://stackoverflow.com/questions/19092658/most-recent-nifty-gui-initialization

Said that, copying the helloword.xml from there works like a charm

<?xml version="1.0" encoding="UTF-8"?>
<nifty xmlns="http://nifty-gui.sourceforge.net/nifty-1.3.xsd" xmlns:xsi="http://
www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://niftygui.
sourceforge.net/nifty-1.3.xsd http://nifty-gui.sourceforge.net/nifty-1.3.xsd">
    <screen id="start">
        <layer childLayout="center">
            <text font="aurulent-sans-16.fnt" color="#ffff"
      text="Hello World!" />
        </layer>
    </screen>
</nifty>

Then I think I will go digging that manual ^^