Hello
I have start screen which has three buttons, continue, new user and quit. When the new user button is pressed a popup layer appears which has a text field and a button named start. User is supposed to insert the name and click the start button to begin the game. After clicking the start button user is directed to hud screen which has one of the buttons go back to menu(start screen). When this button is clicked it goes back to start screen. But the popup layer is still open on the start screen.
I tried to close this popup using following code:
[java]
public void startGame(String nextScreen) {
Element popupElement = nifty.createPopup("PopNewUser");
nifty.closePopup(popupElement.getId());
nifty.gotoScreen(nextScreen);
}
But doesn’t have affect.