summaryrefslogtreecommitdiffstats
path: root/core/src/ch/asynk/tankontank/game/hud
diff options
context:
space:
mode:
authorJérémy Zurcher <jeremy@asynk.ch>2014-12-30 21:44:12 +0100
committerJérémy Zurcher <jeremy@asynk.ch>2014-12-30 21:44:12 +0100
commit2c58bbf094d26f755eb43ee83fad0c17854224c0 (patch)
tree9ba8999f146a870399ae7ef01a6682ccbe93be8f /core/src/ch/asynk/tankontank/game/hud
parentda40130331b292b6b4a143959fe111a9312d8f9d (diff)
downloadRustAndDust-2c58bbf094d26f755eb43ee83fad0c17854224c0.zip
RustAndDust-2c58bbf094d26f755eb43ee83fad0c17854224c0.tar.gz
extract ui.atlas from hud.atlas
Diffstat (limited to 'core/src/ch/asynk/tankontank/game/hud')
-rw-r--r--core/src/ch/asynk/tankontank/game/hud/ActionButtons.java10
-rw-r--r--core/src/ch/asynk/tankontank/game/hud/Engagement.java14
-rw-r--r--core/src/ch/asynk/tankontank/game/hud/PlayerInfo.java14
3 files changed, 19 insertions, 19 deletions
diff --git a/core/src/ch/asynk/tankontank/game/hud/ActionButtons.java b/core/src/ch/asynk/tankontank/game/hud/ActionButtons.java
index ff9034e..17402f0 100644
--- a/core/src/ch/asynk/tankontank/game/hud/ActionButtons.java
+++ b/core/src/ch/asynk/tankontank/game/hud/ActionButtons.java
@@ -40,9 +40,9 @@ public class ActionButtons extends Widget
private StateType states [];
private Position position;
- public ActionButtons(Ctrl ctrl, TextureAtlas atlas)
+ public ActionButtons(Ctrl ctrl, TextureAtlas uiAtlas, TextureAtlas hudAtlas)
{
- this.bg = new Sprite(atlas.findRegion("disabled"));
+ this.bg = new Sprite(uiAtlas.findRegion("disabled"));
this.ctrl = ctrl;
this.visible = false;
this.position = Position.BOTTOM_RIGHT;
@@ -50,9 +50,9 @@ public class ActionButtons extends Widget
this.buttons = new Bg[Buttons.LAST.i];
- this.buttons[Buttons.DONE.i] = new Bg(atlas.findRegion("ok"));
- this.buttons[Buttons.ABORT.i] = new Bg(atlas.findRegion("cancel"));
- this.buttons[Buttons.PROMOTE.i] = new Bg(atlas.findRegion("promote"));
+ this.buttons[Buttons.DONE.i] = new Bg(uiAtlas.findRegion("ok"));
+ this.buttons[Buttons.ABORT.i] = new Bg(uiAtlas.findRegion("cancel"));
+ this.buttons[Buttons.PROMOTE.i] = new Bg(hudAtlas.findRegion("promote"));
this.states = new StateType[Buttons.LAST.i];
this.states[Buttons.DONE.i] = StateType.DONE;
diff --git a/core/src/ch/asynk/tankontank/game/hud/Engagement.java b/core/src/ch/asynk/tankontank/game/hud/Engagement.java
index 805b7d6..ffbfa65 100644
--- a/core/src/ch/asynk/tankontank/game/hud/Engagement.java
+++ b/core/src/ch/asynk/tankontank/game/hud/Engagement.java
@@ -44,18 +44,18 @@ public class Engagement extends Patch implements Animation
private DiceAnimation d3Animation;
private DiceAnimation d4Animation;
- public Engagement(BitmapFont font, TextureAtlas atlas)
+ public Engagement(BitmapFont font, TextureAtlas uiAtlas, TextureAtlas hudAtlas)
{
- super(atlas.createPatch("typewriter"));
- usFlag = new Sprite(atlas.findRegion("us-flag"));
- geFlag = new Sprite(atlas.findRegion("ge-flag"));
- attackImg = new Sprite(atlas.findRegion("attack"));
- defenseImg = new Sprite(atlas.findRegion("defense"));
+ super(uiAtlas.createPatch("typewriter"));
+ usFlag = new Sprite(hudAtlas.findRegion("us-flag"));
+ geFlag = new Sprite(hudAtlas.findRegion("ge-flag"));
+ attackImg = new Sprite(hudAtlas.findRegion("attack"));
+ defenseImg = new Sprite(hudAtlas.findRegion("defense"));
this.attack = new Label(font);
this.defense = new Label(font);
this.attackR = new Label(font);
this.defenseR = new Label(font);
- this.okBtn = new Bg(atlas.findRegion("ok"));
+ this.okBtn = new Bg(uiAtlas.findRegion("ok"));
this.visible = false;
this.d1Animation = new DiceAnimation();
this.d2Animation = new DiceAnimation();
diff --git a/core/src/ch/asynk/tankontank/game/hud/PlayerInfo.java b/core/src/ch/asynk/tankontank/game/hud/PlayerInfo.java
index 6125517..24f07b8 100644
--- a/core/src/ch/asynk/tankontank/game/hud/PlayerInfo.java
+++ b/core/src/ch/asynk/tankontank/game/hud/PlayerInfo.java
@@ -37,16 +37,16 @@ public class PlayerInfo implements Disposable, Drawable, Animation
public UnitDock unitDock;
private Position position;
- public PlayerInfo(Ctrl ctrl, BitmapFont font, TextureAtlas atlas)
+ public PlayerInfo(Ctrl ctrl, BitmapFont font, TextureAtlas uiAtlas, TextureAtlas hudAtlas)
{
this.ctrl = ctrl;
this.position = Position.MIDDLE_CENTER;
- usFlag = new Sprite(atlas.findRegion("us-flag"));
- geFlag = new Sprite(atlas.findRegion("ge-flag"));
- turns = new LabelImage(atlas.findRegion("turns"), font, 5f);
- aps = new LabelImage(atlas.findRegion("aps"), font, 5f);
- reinforcement = new LabelImage(atlas.findRegion("reinforcement"), font, 5f);
- unitDock = new UnitDock(ctrl, atlas.findRegion("disabled"), atlas.findRegion("reinforcement-selected"), 10f);
+ usFlag = new Sprite(hudAtlas.findRegion("us-flag"));
+ geFlag = new Sprite(hudAtlas.findRegion("ge-flag"));
+ turns = new LabelImage(hudAtlas.findRegion("turns"), font, 5f);
+ aps = new LabelImage(hudAtlas.findRegion("aps"), font, 5f);
+ reinforcement = new LabelImage(hudAtlas.findRegion("reinforcement"), font, 5f);
+ unitDock = new UnitDock(ctrl, uiAtlas.findRegion("disabled"), hudAtlas.findRegion("reinforcement-selected"), 10f);
}
@Override