Slick & NiftyGUI. Nifty initialize exception

Posted by Romeo on Game Development See other posts from Game Development or by Romeo
Published on 2012-04-06T16:07:48Z Indexed on 2012/04/06 17:43 UTC
Read the original article Hit count: 288

Filed under:
|
|

I found my self into trouble when trying to run a Slick game with a Nifty Game State. This is the code:

@Override
protected void initGameAndGUI(GameContainer container, StateBasedGame game)
        throws SlickException {
    initNifty(container, game);     
}

If i run this i get: java.lang.IllegalStateException: The NiftyGUI was already initialized. Its illegal to do so twice.

If i delete the call to initNifty() i get another exception:java.lang.IllegalStateException: NiftyGUI was not initialized.

© Game Development or respective owner

Related posts about java

Related posts about gui