What do I use instead of nifty.exit() to give the game state back to the game

On my Menu I have a button Start Game when I push it I want to give the focus(if thats the right word) back to the game

My Code is

[java]

public void startGame() {

System.out.println(this + " startGame()");

ScriptBlocksApplication.getInstance().gameState();

nifty.exit();

}

[/java]



The Problem with this is that I have a second Nifty Screen Called Inventory



if I call nifty.exit on that one two It seems the program gets confused and doesnt know which GUI to use and wont close either.



Use Case:

Game Starts Shows the Menu

User Hits the Start Game Button

Game starts

User Wants to check inventory

Inventory Screen Starts up

User wants to exit out of inventory

… Program gets stuck here window wont close.



-Greg