/** * Removes and returns the topmost screen on the stack, its {@code hide()} method is called. * * @return the removed screen */ public static GameScreen popScreen() { GameScreen gs = screenStack.pop(); gs.hide(); return gs; }