summaryrefslogtreecommitdiffstats
path: root/core/src
diff options
context:
space:
mode:
authorJérémy Zurcher <jeremy@asynk.ch>2016-02-22 09:09:55 +0100
committerJérémy Zurcher <jeremy@asynk.ch>2016-02-22 09:09:55 +0100
commit68865bd48302bee6c4b533b499e0bfef10f5cdd6 (patch)
treec6887aeb353233214f531c0ed738df5973e929bf /core/src
parent2df9388d390dccb52d320d31f2be0d03f70086be (diff)
downloadRustAndDust-68865bd48302bee6c4b533b499e0bfef10f5cdd6.zip
RustAndDust-68865bd48302bee6c4b533b499e0bfef10f5cdd6.tar.gz
PlayMenu: set config.gameId to NO_RECORDS early in prepare()
Diffstat (limited to 'core/src')
-rw-r--r--core/src/ch/asynk/rustanddust/menu/PlayMenu.java3
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;