From 41260eeabca45c96eb2dcc5450d8ce1366889be6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=A9my=20Zurcher?= Date: Sun, 21 Feb 2016 22:21:16 +0100 Subject: OptionsPanel: use String aware Label constructor --- core/src/ch/asynk/rustanddust/game/hud/OptionsPanel.java | 16 +++++----------- 1 file changed, 5 insertions(+), 11 deletions(-) diff --git a/core/src/ch/asynk/rustanddust/game/hud/OptionsPanel.java b/core/src/ch/asynk/rustanddust/game/hud/OptionsPanel.java index 5e004e6..bb7f231 100644 --- a/core/src/ch/asynk/rustanddust/game/hud/OptionsPanel.java +++ b/core/src/ch/asynk/rustanddust/game/hud/OptionsPanel.java @@ -40,22 +40,17 @@ public class OptionsPanel extends Patch super(game.bgPatch); this.game = game; this.font = game.font; - this.title = new Label(game.font, LABEL_PADDING); - this.title.write("- Options"); - this.fxVolume = new Label(game.font, LABEL_PADDING); - this.fxVolume.write("Fx Volume"); + this.title = new Label("- Options", game.font, LABEL_PADDING); + this.fxVolume = new Label("Fx Volume", game.font, LABEL_PADDING); this.fxVolumeValue = new Label(game.font, LABEL_PADDING); - this.objectives = new Label(game.font, LABEL_PADDING); - this.objectives.write("Battle Objectives"); + this.objectives = new Label("Battle Objectives", game.font, LABEL_PADDING); this.objectivesPanel = new ObjectivesPanel(game); - this.quit = new Label(game.font, LABEL_PADDING); - this.quit.write("Quit battle"); + this.quit = new Label("Quit Battle", game.font, LABEL_PADDING); this.visible = false; this.checkValues = new boolean[checkStrings.length]; this.checkLabels = new Label[checkStrings.length]; for (int i = 0; i < checkLabels.length; i++) { - Label l = new Label(game.font, LABEL_PADDING); - l.write(checkStrings[i]); + Label l = new Label(checkStrings[i], game.font, LABEL_PADDING); this.checkLabels[i] = l; } GlyphLayout layout = new GlyphLayout(); @@ -79,7 +74,6 @@ public class OptionsPanel extends Patch public void show(Position position) { - fxVolumeValue.write(game.config.fxStrings[0]); float h = (title.getHeight() + TITLE_PADDING + fxVolumeValue.getHeight()); for (int i = 0; i < checkLabels.length; i++) -- cgit v1.1-2-g2b99