diff options
Diffstat (limited to 'core/src/ch/asynk/rustanddust/ui')
-rw-r--r-- | core/src/ch/asynk/rustanddust/ui/OkCancel.java | 8 |
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; } |