diff options
| author | Jérémy Zurcher <jeremy@asynk.ch> | 2015-11-10 11:32:41 +0100 | 
|---|---|---|
| committer | Jérémy Zurcher <jeremy@asynk.ch> | 2015-11-10 11:32:41 +0100 | 
| commit | cd0cd844fbe1b4812ba211567276ca3074d32f17 (patch) | |
| tree | 6d83122da3e43f053bec9620cf7642f59cfabbf9 /core | |
| parent | 0587c0ef066c9fbd29d0bb0084c48006acb6a5d9 (diff) | |
| download | RustAndDust-cd0cd844fbe1b4812ba211567276ca3074d32f17.zip RustAndDust-cd0cd844fbe1b4812ba211567276ca3074d32f17.tar.gz | |
Patch: add setBtnLeft(Bg) and setBtnRight(Bg)
Diffstat (limited to 'core')
| -rw-r--r-- | core/src/ch/asynk/rustanddust/ui/Patch.java | 10 | 
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))); +    }  } | 
