From 68865bd48302bee6c4b533b499e0bfef10f5cdd6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=A9my=20Zurcher?= Date: Mon, 22 Feb 2016 09:09:55 +0100 Subject: PlayMenu: set config.gameId to NO_RECORDS early in prepare() --- core/src/ch/asynk/rustanddust/menu/PlayMenu.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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; -- cgit v1.1-2-g2b99