From 47dddb62b66d943b8c77a0dcb868c68516063ada Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=A9my=20Zurcher?= Date: Mon, 9 Nov 2015 22:56:56 +0100 Subject: EngagementPanel: us Bg instead of Sprite to scale --- .../asynk/rustanddust/game/hud/EngagementPanel.java | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) diff --git a/core/src/ch/asynk/rustanddust/game/hud/EngagementPanel.java b/core/src/ch/asynk/rustanddust/game/hud/EngagementPanel.java index 01a8852..0597a29 100644 --- a/core/src/ch/asynk/rustanddust/game/hud/EngagementPanel.java +++ b/core/src/ch/asynk/rustanddust/game/hud/EngagementPanel.java @@ -1,7 +1,6 @@ package ch.asynk.rustanddust.game.hud; 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.glutils.ShapeRenderer; @@ -28,11 +27,11 @@ public class EngagementPanel extends Patch implements Animation private State state; private boolean reroll; private float rerollY; - private Sprite usFlag; - private Sprite geFlag; - private Sprite winner; - private Sprite attackImg; - private Sprite defenseImg; + private Bg usFlag; + private Bg geFlag; + private Bg winner; + private Bg attackImg; + private Bg defenseImg; private Label attack; private Label defense; private Label attackR; @@ -46,10 +45,10 @@ public class EngagementPanel extends Patch implements Animation public EngagementPanel(BitmapFont font, TextureAtlas uiAtlas, TextureAtlas hudAtlas) { 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")); + usFlag = new Bg(hudAtlas.findRegion("us-flag")); + geFlag = new Bg(hudAtlas.findRegion("ge-flag")); + attackImg = new Bg(hudAtlas.findRegion("attack")); + defenseImg = new Bg(hudAtlas.findRegion("defense")); this.attack = new Label(font); this.defense = new Label(font); this.attackR = new Label(font); -- cgit v1.1-2-g2b99