summaryrefslogtreecommitdiffstats
path: root/core/src/ch/asynk/rustanddust/ui
diff options
context:
space:
mode:
authorJérémy Zurcher <jeremy@asynk.ch>2016-02-22 18:23:02 +0100
committerJérémy Zurcher <jeremy@asynk.ch>2016-02-22 18:23:02 +0100
commit18db2f47e4808eda33f24e1a8571f62344524f71 (patch)
tree8a25ed7261dedb9ded9b7f77dc91e5365f50efba /core/src/ch/asynk/rustanddust/ui
parent6ec6e479d1fb91c51c65fecee9045c07fa92300d (diff)
downloadRustAndDust-18db2f47e4808eda33f24e1a8571f62344524f71.zip
RustAndDust-18db2f47e4808eda33f24e1a8571f62344524f71.tar.gz
Sound type/enter: nicer, better
Diffstat (limited to 'core/src/ch/asynk/rustanddust/ui')
-rw-r--r--core/src/ch/asynk/rustanddust/ui/OkCancel.java8
1 files changed, 1 insertions, 7 deletions
diff --git a/core/src/ch/asynk/rustanddust/ui/OkCancel.java b/core/src/ch/asynk/rustanddust/ui/OkCancel.java
index 8bbceef..5036995 100644
--- a/core/src/ch/asynk/rustanddust/ui/OkCancel.java
+++ b/core/src/ch/asynk/rustanddust/ui/OkCancel.java
@@ -1,6 +1,5 @@
package ch.asynk.rustanddust.ui;
-import com.badlogic.gdx.audio.Sound;
import com.badlogic.gdx.graphics.g2d.Batch;
import com.badlogic.gdx.graphics.g2d.NinePatch;
import com.badlogic.gdx.graphics.g2d.BitmapFont;
@@ -17,15 +16,13 @@ public class OkCancel extends Patch
protected Label label;
protected Bg okBtn;
protected Bg cancelBtn;
- protected Sound snd;
- public OkCancel(BitmapFont font, NinePatch patch, AtlasRegion okRegion, AtlasRegion cancelRegion, Sound snd)
+ public OkCancel(BitmapFont font, NinePatch patch, AtlasRegion okRegion, AtlasRegion cancelRegion)
{
super(patch);
this.label = new Label(font);
this.okBtn = new Bg(okRegion);
this.cancelBtn = new Bg(cancelRegion);
- this.snd = snd;
this.visible = false;
}
@@ -75,16 +72,13 @@ public class OkCancel extends Patch
public boolean hit(float x, float y)
{
if (!cancelBtn.visible && super.hit(x, y)) {
- snd.play();
ok = true;
return true;
}
if (okBtn.hit(x, y)) {
- snd.play();
ok = true;
return true;
} else if (cancelBtn.hit(x, y)) {
- snd.play();
ok = false;
return true;
}