From 9906c8e7330130156114a2aa0e3181ea701a297b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=A9my=20Zurcher?= Date: Tue, 10 Nov 2015 12:06:54 +0100 Subject: OptionsMenu: imporve setPosition --- core/src/ch/asynk/rustanddust/menu/OptionsMenu.java | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/core/src/ch/asynk/rustanddust/menu/OptionsMenu.java b/core/src/ch/asynk/rustanddust/menu/OptionsMenu.java index 88c582b..85e3d00 100644 --- a/core/src/ch/asynk/rustanddust/menu/OptionsMenu.java +++ b/core/src/ch/asynk/rustanddust/menu/OptionsMenu.java @@ -14,9 +14,9 @@ import ch.asynk.rustanddust.RustAndDust; public class OptionsMenu extends Patch { - public static int PADDING = 40; + public static int PADDING = 30; public static int OPT_PADDING = 10; - public static int TITLE_PADDING = 30; + public static int TITLE_PADDING = 20; public static int VSPACING = 5; public static int HSPACING = 30; public static String CHECK = "#"; @@ -145,19 +145,19 @@ public class OptionsMenu extends Patch y += PADDING; x += PADDING + HSPACING; - float dy = (VSPACING + checkLabels[0].getHeight()); graphics.setPosition(x, y); graphicsValue.setPosition((x + graphics.getWidth() + OPT_PADDING), y); - y += dy; + y += (VSPACING + graphics.getHeight()); fxVolume.setPosition(x, y); fxVolumeValue.setPosition((x + fxVolume.getWidth() + OPT_PADDING), y); - y += dy; + y += (VSPACING + fxVolume.getHeight()); for (int i = 0; i < checkLabels.length; i++) { checkLabels[i].setPosition(x, y); - y += dy; + y += (VSPACING + checkLabels[i].getHeight()); } y += (TITLE_PADDING - VSPACING); + x -= PADDING; title.setPosition(x, y); } -- cgit v1.1-2-g2b99