Hi! Now, after i barely find a away to show controls etc…, i hve some basic questions:
- how to hide screens/layer/elements correctly, e.g. you have a mainmenu, press play and the game starts. what to do with the mainmenu screen? iterate over all nifty.getCurrentScreen().getLayerElements() and call hide(); on it? Or do i need an empty screen and have to call gotoScreen(“empty”)?
- isn’t every single “page” a screen for itself? The tutorial.xml e.g. has a page concept differing hard from what i thought how to handle nifty, because the pages are no screens, actually they are just control-definitions which get changed. i thought that i have a screen for my mainmenu, a screen for my optionsmenu, one for the credits etc…
3 How can i wait for all gui-operations done, before heading on? e.g. if i press a “new game”- button i want to fade or move the menu out, and then init the game. Status Quo: i call nifty.gotoScreen(“empty”) to get rid of the mainmenu on get the onScreenEnd-effects done, and initGame() after. But the onScreenEnd is (with delay), and the initGame() to fast or somethin.
I have no feeling for what i can do in xml, and what i have to do in java…
It were reallly nice if there is a expample *jar with a common menu or somethin, anything where i can see some mechanics of nifty. The wiki doesn’t help a lot.
Thanx