diff options
author | Jérémy Zurcher <jeremy@asynk.ch> | 2015-12-18 11:10:21 +0100 |
---|---|---|
committer | Jérémy Zurcher <jeremy@asynk.ch> | 2015-12-18 11:10:21 +0100 |
commit | cb81f0a8a194ceebaea880f9027635e6a27df69e (patch) | |
tree | a64e55aaa5f45d8329737af6633a6d3fe9f3a3ff /core/src/ch/asynk/rustanddust/menu/PlayMenu.java | |
parent | 75ff89304eaf9052ab889bb7ec81c96de4fa7908 (diff) | |
download | RustAndDust-cb81f0a8a194ceebaea880f9027635e6a27df69e.zip RustAndDust-cb81f0a8a194ceebaea880f9027635e6a27df69e.tar.gz |
UI: merge menu and ui assets, AtlasRegion are known and provided by RustAndDust
Diffstat (limited to 'core/src/ch/asynk/rustanddust/menu/PlayMenu.java')
-rw-r--r-- | core/src/ch/asynk/rustanddust/menu/PlayMenu.java | 24 |
1 files changed, 10 insertions, 14 deletions
diff --git a/core/src/ch/asynk/rustanddust/menu/PlayMenu.java b/core/src/ch/asynk/rustanddust/menu/PlayMenu.java index cbf182d..866a647 100644 --- a/core/src/ch/asynk/rustanddust/menu/PlayMenu.java +++ b/core/src/ch/asynk/rustanddust/menu/PlayMenu.java @@ -1,8 +1,6 @@ package ch.asynk.rustanddust.menu; import com.badlogic.gdx.graphics.g2d.Batch; -import com.badlogic.gdx.graphics.g2d.BitmapFont; -import com.badlogic.gdx.graphics.g2d.TextureAtlas; import ch.asynk.rustanddust.ui.Label; import ch.asynk.rustanddust.ui.Bg; @@ -17,7 +15,6 @@ public class PlayMenu extends Patch public static int VSPACING = 30; private final RustAndDust game; - private final BitmapFont font; private Label title; private Label gameMode; @@ -32,22 +29,21 @@ public class PlayMenu extends Patch public boolean launch; - public PlayMenu(RustAndDust game, BitmapFont font, TextureAtlas atlas) + public PlayMenu(RustAndDust game) { - super(atlas.createPatch("typewriter")); + super(game.ninePatch); this.game = game; - this.font = font; - this.title = new Label(font); + this.title = new Label(game.font); this.title.write("- Play"); - this.gameMode = new Label(font); + this.gameMode = new Label(game.font); this.gameMode.write("Game mode : "); - this.gameModeValue = new Label(font); - this.okBtn = new Bg(atlas.findRegion("ok")); - this.cancelBtn = new Bg(atlas.findRegion("cancel")); - this.battle = new Label(font); + this.gameModeValue = new Label(game.font); + this.okBtn = new Bg(game.getUiRegion(game.UI_OK)); + this.cancelBtn = new Bg(game.getUiRegion(game.UI_CANCEL)); + this.battle = new Label(game.font); this.battle.write("Scenario : "); - this.battleValue = new Label(font); - this.okCancel = new OkCancel(font, atlas); + this.battleValue = new Label(game.font); + this.okCancel = new OkCancel(game.font, game.ninePatch, game.getUiRegion(game.UI_OK), game.getUiRegion(game.UI_CANCEL)); if (game.config.battle == null) { battleIdx = 0; |