Bugfix: GamePausedScreen did not correctly replace the GameScreen when going to MainMenu.
This commit is contained in:
parent
4017d369b1
commit
0a695432a0
@ -70,7 +70,13 @@ public class Keyboard implements KeyListener {
|
||||
Keyboard.listener.remove(listener);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Make sure we only iterate over copies due to possible concurrent modification.
|
||||
* This method returns a copy of the listener list.
|
||||
*/
|
||||
public ArrayList<KeyboardListener> getListener() {
|
||||
return new ArrayList<KeyboardListener>(Keyboard.listener);
|
||||
}
|
||||
/**
|
||||
* KeyListener method.
|
||||
* Registers the pressed key and passes the event on to registered listeners.
|
||||
|
@ -91,7 +91,8 @@ public class GamePausedScreen extends Screen {
|
||||
this.parent.setOverlay(null);
|
||||
break;
|
||||
case 1:
|
||||
this.parent.setOverlay(new MainMenuScreen(this.parent));
|
||||
//Replace our parents (the game) parent (the SuperScreen) overlay.
|
||||
this.parent.parent.setOverlay(new MainMenuScreen(this.parent.parent));
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user