summaryrefslogtreecommitdiffstats
path: root/core/src/ch/asynk
diff options
context:
space:
mode:
authorJérémy Zurcher <jeremy@asynk.ch>2015-11-10 11:32:41 +0100
committerJérémy Zurcher <jeremy@asynk.ch>2015-11-10 11:32:41 +0100
commitcd0cd844fbe1b4812ba211567276ca3074d32f17 (patch)
tree6d83122da3e43f053bec9620cf7642f59cfabbf9 /core/src/ch/asynk
parent0587c0ef066c9fbd29d0bb0084c48006acb6a5d9 (diff)
downloadRustAndDust-cd0cd844fbe1b4812ba211567276ca3074d32f17.zip
RustAndDust-cd0cd844fbe1b4812ba211567276ca3074d32f17.tar.gz
Patch: add setBtnLeft(Bg) and setBtnRight(Bg)
Diffstat (limited to 'core/src/ch/asynk')
-rw-r--r--core/src/ch/asynk/rustanddust/ui/Patch.java10
1 files changed, 10 insertions, 0 deletions
diff --git a/core/src/ch/asynk/rustanddust/ui/Patch.java b/core/src/ch/asynk/rustanddust/ui/Patch.java
index acff791..f07c44d 100644
--- a/core/src/ch/asynk/rustanddust/ui/Patch.java
+++ b/core/src/ch/asynk/rustanddust/ui/Patch.java
@@ -25,4 +25,14 @@ public class Patch extends Widget
if (!visible) return;
patch.draw(batch, rect.x, rect.y, rect.width, rect.height);
}
+
+ public void setBtnRight(Bg btn)
+ {
+ btn.setPosition((rect.x + rect.width - (btn.getWidth() * 0.666f)), (rect.y - (btn.getHeight() * 0.333f)));
+ }
+
+ public void setBtnLeft(Bg btn)
+ {
+ btn.setPosition((rect.x - (btn.getWidth() * 0.333f)), (rect.y - (btn.getHeight() * 0.333f)));
+ }
}