summaryrefslogtreecommitdiffstats
path: root/core/src/ch/asynk
diff options
context:
space:
mode:
authorJérémy Zurcher <jeremy@asynk.ch>2015-02-19 16:31:55 +0100
committerJérémy Zurcher <jeremy@asynk.ch>2015-02-19 16:31:55 +0100
commite215d5b574be75173d3a2e7082773f6d2853682c (patch)
tree9117a25777e92a9e666141c4cff199829c637715 /core/src/ch/asynk
parent9c3b6f234c918d36b13b7a9818cc3696d83915e4 (diff)
downloadRustAndDust-e215d5b574be75173d3a2e7082773f6d2853682c.zip
RustAndDust-e215d5b574be75173d3a2e7082773f6d2853682c.tar.gz
OkCancel,ScenariosMenu: set cancelBtn on the left
Diffstat (limited to 'core/src/ch/asynk')
-rw-r--r--core/src/ch/asynk/tankontank/menu/ScenariosMenu.java12
-rw-r--r--core/src/ch/asynk/tankontank/ui/OkCancel.java2
2 files changed, 7 insertions, 7 deletions
diff --git a/core/src/ch/asynk/tankontank/menu/ScenariosMenu.java b/core/src/ch/asynk/tankontank/menu/ScenariosMenu.java
index 5f01fba..1eb32fa 100644
--- a/core/src/ch/asynk/tankontank/menu/ScenariosMenu.java
+++ b/core/src/ch/asynk/tankontank/menu/ScenariosMenu.java
@@ -25,7 +25,7 @@ public class ScenariosMenu extends Patch
private float checkDy;
private Label title;
protected Bg okBtn;
- protected Bg backBtn;
+ protected Bg cancelBtn;
private Label [] battleLabels;
public boolean launch;
@@ -36,7 +36,7 @@ public class ScenariosMenu extends Patch
this.game = game;
this.font = font;
this.okBtn = new Bg(atlas.findRegion("ok"));
- this.backBtn = new Bg(atlas.findRegion("cancel"));
+ this.cancelBtn = new Bg(atlas.findRegion("cancel"));
this.title = new Label(font);
this.title.write("- Scenarios");
this.battleLabels = new Label[game.factory.battles.length];
@@ -70,7 +70,7 @@ public class ScenariosMenu extends Patch
setPosition(x, y, w, h);
okBtn.setPosition((x + w - okBtn.getWidth() + BTN_PADDING), (y - BTN_PADDING));
- backBtn.setPosition((okBtn.getX() - backBtn.getWidth() - BTN_PADDING), okBtn.getY());
+ cancelBtn.setPosition((x - BTN_PADDING), okBtn.getY());
y += PADDING;
x += PADDING + HSPACING;
@@ -92,7 +92,7 @@ public class ScenariosMenu extends Patch
if (okBtn.hit(x, y)) {
this.launch = (game.config.battle != null);
return true;
- } else if (backBtn.hit(x, y)) {
+ } else if (cancelBtn.hit(x, y)) {
this.launch = false;
return true;
} else {
@@ -115,7 +115,7 @@ public class ScenariosMenu extends Patch
super.dispose();
title.dispose();
okBtn.dispose();
- backBtn.dispose();
+ cancelBtn.dispose();
for (int i = 0; i < battleLabels.length; i++)
battleLabels[i].dispose();
}
@@ -127,7 +127,7 @@ public class ScenariosMenu extends Patch
super.draw(batch);
title.draw(batch);
okBtn.draw(batch);
- backBtn.draw(batch);
+ cancelBtn.draw(batch);
for (int i = 0; i < battleLabels.length; i++) {
Label l = battleLabels[i];
l.draw(batch);
diff --git a/core/src/ch/asynk/tankontank/ui/OkCancel.java b/core/src/ch/asynk/tankontank/ui/OkCancel.java
index 3dfd28d..39f72cf 100644
--- a/core/src/ch/asynk/tankontank/ui/OkCancel.java
+++ b/core/src/ch/asynk/tankontank/ui/OkCancel.java
@@ -66,7 +66,7 @@ public class OkCancel extends Patch
setPosition(x, y, width, height);
okBtn.setPosition((x + width - okBtn.getWidth() - PADDING), (y + PADDING));
- cancelBtn.setPosition((okBtn.getX() - cancelBtn.getWidth() - HSPACING), okBtn.getY());
+ cancelBtn.setPosition((x + PADDING), okBtn.getY());
label.setPosition((x + PADDING), (y + PADDING + okBtn.getHeight() + VSPACING));
cancelBtn.visible = true;
visible = true;