summaryrefslogtreecommitdiffstats
path: root/core/src
diff options
context:
space:
mode:
authorJérémy Zurcher <jeremy@asynk.ch>2015-12-09 09:23:26 +0100
committerJérémy Zurcher <jeremy@asynk.ch>2015-12-09 09:23:26 +0100
commit6724b48b61826455733dd3492014aee3de031845 (patch)
treea7bf6526a94151e43df1e5dd3dce164206c3edce /core/src
parent4bda843b2878d0d92b09c3c0d75c73e2d0fc8092 (diff)
downloadRustAndDust-6724b48b61826455733dd3492014aee3de031845.zip
RustAndDust-6724b48b61826455733dd3492014aee3de031845.tar.gz
EngagementPanel: remove OK button
Diffstat (limited to 'core/src')
-rw-r--r--core/src/ch/asynk/rustanddust/game/hud/EngagementPanel.java12
1 files changed, 2 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 599383a..2e114cb 100644
--- a/core/src/ch/asynk/rustanddust/game/hud/EngagementPanel.java
+++ b/core/src/ch/asynk/rustanddust/game/hud/EngagementPanel.java
@@ -38,7 +38,6 @@ public class EngagementPanel extends Patch implements Animation
private Label defense;
private Label attackR;
private Label defenseR;
- private Bg okBtn;
private DiceAnimation d1Animation;
private DiceAnimation d2Animation;
private DiceAnimation d3Animation;
@@ -55,7 +54,6 @@ public class EngagementPanel extends Patch implements Animation
this.defense = new Label(font);
this.attackR = new Label(font);
this.defenseR = new Label(font);
- this.okBtn = new Bg(uiAtlas.findRegion("ok"));
this.visible = false;
int d = (int) Math.max((Gdx.graphics.getWidth() * 0.03f), DICE_DIMENSION);
this.d1Animation = new DiceAnimation(d);
@@ -77,7 +75,6 @@ public class EngagementPanel extends Patch implements Animation
defense.translate(dx, dy);
attackR.translate(dx, dy);
defenseR.translate(dx, dy);
- okBtn.translate(dx, dy);
d1Animation.translate(dx, dy);
d2Animation.translate(dx, dy);
d3Animation.translate(dx, dy);
@@ -124,11 +121,9 @@ public class EngagementPanel extends Patch implements Animation
float height = (winner.getHeight() + attack.getHeight() + defense.getHeight() + (2 * VSPACING) + (2 * PADDING));
float width = (attackImg.getWidth() + (2 * d1Animation.getWidth()) + attack.getWidth() + w + (4 * HSPACING) + (2 * PADDING));
float x = position.getX(width);
- float y = position.getY(height) + (okBtn.getHeight() / 2.0f);
+ float y = position.getY(height);
setPosition(x, y, width, height);
- setBtnRight(okBtn);
-
x += PADDING;
y += PADDING;
winner.setPosition((x + (width / 2f) - (winner.getWidth() / 2f)), y);
@@ -160,7 +155,7 @@ public class EngagementPanel extends Patch implements Animation
@Override
public boolean hit(float x, float y)
{
- return (rect.contains(x, y) || okBtn.hit(x, y));
+ return rect.contains(x, y);
}
@Override
@@ -216,7 +211,6 @@ public class EngagementPanel extends Patch implements Animation
d2Animation.dispose();
d3Animation.dispose();
d4Animation.dispose();
- okBtn.dispose();
}
@Override
@@ -235,7 +229,6 @@ public class EngagementPanel extends Patch implements Animation
defenseImg.draw(batch);
defense.draw(batch);
defenseR.draw(batch);
- okBtn.draw(batch);
if (state == State.RESULT) {
attackR.draw(batch);
winner.draw(batch);
@@ -251,6 +244,5 @@ public class EngagementPanel extends Patch implements Animation
defense.drawDebug(shapes);
attackR.drawDebug(shapes);
defenseR.drawDebug(shapes);
- okBtn.drawDebug(shapes);
}
}