diff options
author | Jérémy Zurcher <jeremy@asynk.ch> | 2015-11-09 22:20:43 +0100 |
---|---|---|
committer | Jérémy Zurcher <jeremy@asynk.ch> | 2015-11-09 22:20:43 +0100 |
commit | 7a3d64b43b1e40c69a1efff8c487950960b27ea8 (patch) | |
tree | 8b491509741d26edea5f84536188f9816bf7844f /core/src/ch/asynk/rustanddust/ui | |
parent | c781b30d6c7d642a2ab638be9aa0c8415f040297 (diff) | |
download | RustAndDust-7a3d64b43b1e40c69a1efff8c487950960b27ea8.zip RustAndDust-7a3d64b43b1e40c69a1efff8c487950960b27ea8.tar.gz |
ui: center ok/cancel buttons on box corners
Diffstat (limited to 'core/src/ch/asynk/rustanddust/ui')
-rw-r--r-- | core/src/ch/asynk/rustanddust/ui/OkCancel.java | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/core/src/ch/asynk/rustanddust/ui/OkCancel.java b/core/src/ch/asynk/rustanddust/ui/OkCancel.java index f30a65b..a313173 100644 --- a/core/src/ch/asynk/rustanddust/ui/OkCancel.java +++ b/core/src/ch/asynk/rustanddust/ui/OkCancel.java @@ -54,8 +54,8 @@ public class OkCancel extends Patch float y = position.getY(height); setPosition(x, y, width, height); - okBtn.setPosition((x + width - okBtn.getWidth() - PADDING), (y + PADDING)); - cancelBtn.setPosition((x + PADDING), okBtn.getY()); + okBtn.setPosition((x + width - (okBtn.getWidth() / 2.0f)), (y - (okBtn.getHeight() / 2.0f))); + cancelBtn.setPosition((x - (cancelBtn.getWidth() / 2.0f)), (y - (cancelBtn.getHeight() / 2.0f))); label.setPosition((x + PADDING), (y + PADDING + okBtn.getHeight() + VSPACING)); cancelBtn.visible = true; visible = true; |