diff options
author | Jérémy Zurcher <jeremy@asynk.ch> | 2016-02-21 22:21:16 +0100 |
---|---|---|
committer | Jérémy Zurcher <jeremy@asynk.ch> | 2016-02-21 22:21:16 +0100 |
commit | 41260eeabca45c96eb2dcc5450d8ce1366889be6 (patch) | |
tree | 2c8e0f325a54aa3642a1bfb1890662242ac81fa7 /core/src/ch/asynk | |
parent | 301bfbb899e1e77a031256affac5027a069a91f4 (diff) | |
download | RustAndDust-41260eeabca45c96eb2dcc5450d8ce1366889be6.zip RustAndDust-41260eeabca45c96eb2dcc5450d8ce1366889be6.tar.gz |
OptionsPanel: use String aware Label constructor
Diffstat (limited to 'core/src/ch/asynk')
-rw-r--r-- | core/src/ch/asynk/rustanddust/game/hud/OptionsPanel.java | 16 |
1 files 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++) |