Problem with simpleInitApp()


I have a problem with the simpleInitApp() method: I created a menu which is shown when the game is started. In the Menü you can for example choose a course and the difficulty. These settings are written a .txt file. After that the nifty is closed and now I want to readout these settings and start the game with these settings. The problem is that the simpleInitApp() method continue on working on the commands. So the game is started with the Settings you made the last time you started the game and not withe the current settings.

Can someone tell me how to realize that the simpleInitApp waits until the Nifty is closed?

Thanks in advanced

This canmot work since the application needs to be initialized to show a nifty gui. But you can simply change the settings and restart the application with those.

But if I do so the Nifty would be shown again and that would not be nice^^

Is there a way to realize the functionality I want?