summaryrefslogtreecommitdiffstats
path: root/core
diff options
context:
space:
mode:
Diffstat (limited to 'core')
-rw-r--r--core/src/ch/asynk/tankontank/game/Hud.java10
-rw-r--r--core/src/ch/asynk/tankontank/game/hud/ActionButtons.java5
-rw-r--r--core/src/ch/asynk/tankontank/game/hud/Engagement.java5
-rw-r--r--core/src/ch/asynk/tankontank/game/hud/Msg.java6
-rw-r--r--core/src/ch/asynk/tankontank/game/hud/OkCancel.java5
-rw-r--r--core/src/ch/asynk/tankontank/game/hud/Statistics.java5
6 files changed, 16 insertions, 20 deletions
diff --git a/core/src/ch/asynk/tankontank/game/Hud.java b/core/src/ch/asynk/tankontank/game/Hud.java
index 06ccfde..f1b2f35 100644
--- a/core/src/ch/asynk/tankontank/game/Hud.java
+++ b/core/src/ch/asynk/tankontank/game/Hud.java
@@ -52,12 +52,12 @@ public class Hud implements Disposable, Animation
TextureAtlas atlas = game.factory.hudAtlas;
font = new BitmapFont(Gdx.files.internal("skin/veteran.fnt"), atlas.findRegion("veteran-white"));
playerInfo = new PlayerInfo(ctrl, font, atlas, 5f);
- actionButtons = new ActionButtons(ctrl, atlas.findRegion("disabled"), atlas, 5f);
+ actionButtons = new ActionButtons(ctrl, atlas, 5f);
actionButtons.hide();
- msg = new Msg(font, atlas.findRegion("disabled"), 10f);
- okCancel = new OkCancel(font, atlas.findRegion("disabled"), atlas, 10f);
- stats = new Statistics(font, atlas.findRegion("disabled"), atlas, 10f);
- engagement = new Engagement(font, atlas.findRegion("disabled"), atlas, 10f);
+ msg = new Msg(font, atlas, 10f);
+ okCancel = new OkCancel(font, atlas, 10f);
+ stats = new Statistics(font, atlas, 10f);
+ engagement = new Engagement(font, atlas, 10f);
}
@Override
diff --git a/core/src/ch/asynk/tankontank/game/hud/ActionButtons.java b/core/src/ch/asynk/tankontank/game/hud/ActionButtons.java
index 8c0682c..707a833 100644
--- a/core/src/ch/asynk/tankontank/game/hud/ActionButtons.java
+++ b/core/src/ch/asynk/tankontank/game/hud/ActionButtons.java
@@ -2,7 +2,6 @@ package ch.asynk.tankontank.game.hud;
import com.badlogic.gdx.graphics.g2d.Batch;
import com.badlogic.gdx.graphics.g2d.TextureAtlas;
-import com.badlogic.gdx.graphics.g2d.TextureRegion;
import com.badlogic.gdx.graphics.glutils.ShapeRenderer;
import ch.asynk.tankontank.game.Ctrl;
@@ -35,9 +34,9 @@ public class ActionButtons extends Bg
private StateType states [];
private Position position;
- public ActionButtons(Ctrl ctrl, TextureRegion region, TextureAtlas atlas, float padding)
+ public ActionButtons(Ctrl ctrl, TextureAtlas atlas, float padding)
{
- super(region);
+ super(atlas.findRegion("disabled"));
this.ctrl = ctrl;
this.padding = padding;
this.visible = false;
diff --git a/core/src/ch/asynk/tankontank/game/hud/Engagement.java b/core/src/ch/asynk/tankontank/game/hud/Engagement.java
index d9a9ff1..1ed701d 100644
--- a/core/src/ch/asynk/tankontank/game/hud/Engagement.java
+++ b/core/src/ch/asynk/tankontank/game/hud/Engagement.java
@@ -4,7 +4,6 @@ import com.badlogic.gdx.graphics.g2d.Batch;
import com.badlogic.gdx.graphics.g2d.Sprite;
import com.badlogic.gdx.graphics.g2d.BitmapFont;
import com.badlogic.gdx.graphics.g2d.TextureAtlas;
-import com.badlogic.gdx.graphics.g2d.TextureRegion;
import com.badlogic.gdx.graphics.glutils.ShapeRenderer;
import ch.asynk.tankontank.game.Map;
@@ -29,9 +28,9 @@ public class Engagement extends Bg implements Animation
private DiceAnimation d1Animation;
private DiceAnimation d2Animation;
- public Engagement(BitmapFont font, TextureRegion region, TextureAtlas atlas, float padding)
+ public Engagement(BitmapFont font, TextureAtlas atlas, float padding)
{
- super(region);
+ super(atlas.findRegion("disabled"));
usFlag = new Sprite(atlas.findRegion("us-flag"));
geFlag = new Sprite(atlas.findRegion("ge-flag"));
attackImg = new Sprite(atlas.findRegion("attack"));
diff --git a/core/src/ch/asynk/tankontank/game/hud/Msg.java b/core/src/ch/asynk/tankontank/game/hud/Msg.java
index cc701fb..295631a 100644
--- a/core/src/ch/asynk/tankontank/game/hud/Msg.java
+++ b/core/src/ch/asynk/tankontank/game/hud/Msg.java
@@ -4,7 +4,7 @@ import java.util.ArrayDeque;
import com.badlogic.gdx.graphics.g2d.Batch;
import com.badlogic.gdx.graphics.g2d.BitmapFont;
-import com.badlogic.gdx.graphics.g2d.TextureRegion;
+import com.badlogic.gdx.graphics.g2d.TextureAtlas;
import com.badlogic.gdx.graphics.glutils.ShapeRenderer;
import ch.asynk.tankontank.engine.gfx.Animation;
@@ -29,11 +29,11 @@ public class Msg extends Label implements Animation
private float elapsed;
private ArrayDeque<MsgInfo> stack;
- public Msg(BitmapFont font, TextureRegion region, float padding)
+ public Msg(BitmapFont font, TextureAtlas atlas, float padding)
{
super(font, padding);
this.visible = false;
- this.bg = new Bg(region);
+ this.bg = new Bg(atlas.findRegion("disabled"));
this.stack = new ArrayDeque<MsgInfo>();
}
diff --git a/core/src/ch/asynk/tankontank/game/hud/OkCancel.java b/core/src/ch/asynk/tankontank/game/hud/OkCancel.java
index 472d066..d62b761 100644
--- a/core/src/ch/asynk/tankontank/game/hud/OkCancel.java
+++ b/core/src/ch/asynk/tankontank/game/hud/OkCancel.java
@@ -3,7 +3,6 @@ package ch.asynk.tankontank.game.hud;
import com.badlogic.gdx.graphics.g2d.Batch;
import com.badlogic.gdx.graphics.g2d.BitmapFont;
import com.badlogic.gdx.graphics.g2d.TextureAtlas;
-import com.badlogic.gdx.graphics.g2d.TextureRegion;
import com.badlogic.gdx.graphics.glutils.ShapeRenderer;
public class OkCancel extends Bg
@@ -23,9 +22,9 @@ public class OkCancel extends Bg
END_DEPLOYMENT,
}
- public OkCancel(BitmapFont font, TextureRegion region, TextureAtlas atlas, float padding)
+ public OkCancel(BitmapFont font, TextureAtlas atlas, float padding)
{
- super(region);
+ super(atlas.findRegion("disabled"));
this.label = new Label(font);
this.okBtn = new Bg(atlas.findRegion("ok"));
this.cancelBtn = new Bg(atlas.findRegion("cancel"));
diff --git a/core/src/ch/asynk/tankontank/game/hud/Statistics.java b/core/src/ch/asynk/tankontank/game/hud/Statistics.java
index c943778..71e3b0d 100644
--- a/core/src/ch/asynk/tankontank/game/hud/Statistics.java
+++ b/core/src/ch/asynk/tankontank/game/hud/Statistics.java
@@ -3,7 +3,6 @@ package ch.asynk.tankontank.game.hud;
import com.badlogic.gdx.graphics.g2d.Batch;
import com.badlogic.gdx.graphics.g2d.BitmapFont;
import com.badlogic.gdx.graphics.g2d.TextureAtlas;
-import com.badlogic.gdx.graphics.g2d.TextureRegion;
import com.badlogic.gdx.graphics.glutils.ShapeRenderer;
import ch.asynk.tankontank.game.Player;
@@ -17,9 +16,9 @@ public class Statistics extends Bg
private Label stats2;
private Bg okBtn;
- public Statistics(BitmapFont font, TextureRegion region, TextureAtlas atlas, float padding)
+ public Statistics(BitmapFont font, TextureAtlas atlas, float padding)
{
- super(region);
+ super(atlas.findRegion("disabled"));
this.title = new Label(font);
this.header = new Label(font);
this.stats1 = new Label(font);