diff options
author | Jérémy Zurcher <jeremy@asynk.ch> | 2016-02-22 09:09:55 +0100 |
---|---|---|
committer | Jérémy Zurcher <jeremy@asynk.ch> | 2016-02-22 09:09:55 +0100 |
commit | 68865bd48302bee6c4b533b499e0bfef10f5cdd6 (patch) | |
tree | c6887aeb353233214f531c0ed738df5973e929bf /core | |
parent | 2df9388d390dccb52d320d31f2be0d03f70086be (diff) | |
download | RustAndDust-68865bd48302bee6c4b533b499e0bfef10f5cdd6.zip RustAndDust-68865bd48302bee6c4b533b499e0bfef10f5cdd6.tar.gz |
PlayMenu: set config.gameId to NO_RECORDS early in prepare()
Diffstat (limited to 'core')
-rw-r--r-- | core/src/ch/asynk/rustanddust/menu/PlayMenu.java | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/core/src/ch/asynk/rustanddust/menu/PlayMenu.java b/core/src/ch/asynk/rustanddust/menu/PlayMenu.java index 40a1a15..54ba412 100644 --- a/core/src/ch/asynk/rustanddust/menu/PlayMenu.java +++ b/core/src/ch/asynk/rustanddust/menu/PlayMenu.java @@ -62,10 +62,11 @@ public class PlayMenu extends Patch implements MenuCtrl.Panel public MenuCtrl.MenuType prepare() { game.db.loadGames(); + game.config.gameId = game.db.NO_RECORDS; + if (GameRecord.list.size() <= 0) return MenuCtrl.MenuType.NEW_GAME; - game.config.gameId = game.db.NO_RECORDS; getList().setItems(4, GameRecord.list); computePosition(); return MenuCtrl.MenuType.PLAY; |