Nifty can be used as a standalone GUI. So when your game enters its menu or option screens Nifty is all there is on the screen and all user input is handled by Nifty.
When using Nifty together with Slick2d this is represented by the NiftyGameState class. Using this class your Slick2d StateBasedGame can easliy switch from your in game state to the NiftyGameState and display the GUI.
But</strong> this is not the only way Nifty can be used. You can easily use Nifty to render your in-game GUI too! Nifty plays well with others (as long as they use OpenGL/lwjgl for rendering that is).</p>
It's not complicated at all and I wanted to write example code that demonstrates how easy it is for a long time. Motivated by a question at the Nifty Forum at souceforge.net</a> I did now :)</p>
What's demonstrated in the new slick example is, how you can use Nifty to render a GUI on top of a normal slick GameState. Here is a screenshot of the example which renderes Text from within Slick that changes color when you press the keys 1-3. On top of this it renders a Nifty GUI that responds to mouse events. Additionally if you press 1-3 the colored Nifty boxes start to shake :D [caption id="attachment_92" align="aligncenter" width="300" caption="Slick Overlay with Nifty GUI"]<img class="size-medium wp-image-92" title="Slick Overlay with Nifty GUI" src="http://nifty-gui.lessvoid.com/wp-content/2009/09/bildschirmfoto-2009-09-13-um-145515-300x225.png" alt="Slick Overlay with Nifty GUI" width="300" height="225" /></a>[/caption]</p>
You can try it out with the Webstart: http://nifty-gui.sourceforge.net/webstart/nifty-slick-overlay-demo.jnlp</a></p>
and you can find the example in svn or you can browse it online here: http://nifty-gui.svn.sourceforge.net/viewvc/nifty-gui/nifty-examples/trunk/src/main/java/de/lessvoid/nifty/examples/slick/niftyoverlay/</a> (Java classes)</p>