diff options
author | Jérémy Zurcher <jeremy@asynk.ch> | 2016-05-19 12:27:16 +0200 |
---|---|---|
committer | Jérémy Zurcher <jeremy@asynk.ch> | 2016-05-19 12:27:16 +0200 |
commit | 8dc8184d6d821577d9c85667c5b33d2ef3a44c8d (patch) | |
tree | 294aca2b0a8168e6d62c87dd905c2e62e7a3a0d2 /core/src/ch/asynk/rustanddust/menu | |
parent | b45b0c45e91757e64d06e69d6bfda6fd9be74c1d (diff) | |
download | RustAndDust-8dc8184d6d821577d9c85667c5b33d2ef3a44c8d.zip RustAndDust-8dc8184d6d821577d9c85667c5b33d2ef3a44c8d.tar.gz |
DB: loadGames() add int param gameMode
Diffstat (limited to 'core/src/ch/asynk/rustanddust/menu')
-rw-r--r-- | core/src/ch/asynk/rustanddust/menu/PlayMenu.java | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/core/src/ch/asynk/rustanddust/menu/PlayMenu.java b/core/src/ch/asynk/rustanddust/menu/PlayMenu.java index 7e93325..977b56f 100644 --- a/core/src/ch/asynk/rustanddust/menu/PlayMenu.java +++ b/core/src/ch/asynk/rustanddust/menu/PlayMenu.java @@ -67,7 +67,7 @@ public class PlayMenu extends Patch implements MenuCtrl.Panel @Override public MenuCtrl.MenuType prepare() { - game.db.loadGames(); + game.db.loadGames(game.config.gameMode.i); game.config.gameId = game.db.NO_RECORD; if (GameRecord.list.size() <= 0) @@ -140,9 +140,11 @@ public class PlayMenu extends Patch implements MenuCtrl.Panel setConfig(); return MenuCtrl.MenuType.RESUME; } else if (list.hit(x, y)) { - if (i != getList().getIdx()) + if (i != getList().getIdx()) { game.playType(); - showBtns(getList().getIdx() != null); + GameRecord r = (GameRecord) getList().getSelected(); + showBtns((r != null) && (r.canPlay())); + } return MenuCtrl.MenuType.NONE; } |