diff options
author | Jérémy Zurcher <jeremy@asynk.ch> | 2016-01-07 10:06:33 +0100 |
---|---|---|
committer | Jérémy Zurcher <jeremy@asynk.ch> | 2016-01-07 10:06:33 +0100 |
commit | 857015ded40dbf165f52301da89b7180447a11d6 (patch) | |
tree | ea9baff7447ac0ef2501b168c1b26e6c2c6ef912 /core/src/ch/asynk/rustanddust/game/hud | |
parent | 04bf681a8ad967a0fec3faead9682ba9d5b42be2 (diff) | |
download | RustAndDust-857015ded40dbf165f52301da89b7180447a11d6.zip RustAndDust-857015ded40dbf165f52301da89b7180447a11d6.tar.gz |
Config: add fxStrings
Diffstat (limited to 'core/src/ch/asynk/rustanddust/game/hud')
-rw-r--r-- | core/src/ch/asynk/rustanddust/game/hud/OptionsPanel.java | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/core/src/ch/asynk/rustanddust/game/hud/OptionsPanel.java b/core/src/ch/asynk/rustanddust/game/hud/OptionsPanel.java index c7d8b8e..a45a205 100644 --- a/core/src/ch/asynk/rustanddust/game/hud/OptionsPanel.java +++ b/core/src/ch/asynk/rustanddust/game/hud/OptionsPanel.java @@ -15,8 +15,6 @@ public class OptionsPanel extends Patch private String [] checkStrings = { }; - private String [] fxStrings = { "OFF", "10%", "20%", "30%", "40%", "50%", "60%", "70%", "80%", "90%", "ON" }; - public static int PADDING = 30; public static int OPT_PADDING = 10; public static int TITLE_PADDING = 5; @@ -76,7 +74,7 @@ public class OptionsPanel extends Patch public void show(Position position) { - fxVolumeValue.write(fxStrings[0]); + fxVolumeValue.write(game.config.fxStrings[0]); float h = (title.getHeight() + TITLE_PADDING + fxVolumeValue.getHeight()); for (int i = 0; i < checkLabels.length; i++) h += checkLabels[i].getHeight(); @@ -122,14 +120,14 @@ public class OptionsPanel extends Patch private void getValues() { fxVolumeIdx = (int) (game.config.fxVolume * 10); - fxVolumeValue.write(fxStrings[fxVolumeIdx], fxVolumeValue.getX(), fxVolumeValue.getY()); + fxVolumeValue.write(game.config.fxStrings[fxVolumeIdx], fxVolumeValue.getX(), fxVolumeValue.getY()); } private void cycleFxVolume() { fxVolumeIdx += 1; if (fxVolumeIdx > 10) fxVolumeIdx = 0; - fxVolumeValue.write(fxStrings[fxVolumeIdx], fxVolumeValue.getX(), fxVolumeValue.getY()); + fxVolumeValue.write(game.config.fxStrings[fxVolumeIdx], fxVolumeValue.getX(), fxVolumeValue.getY()); game.config.fxVolume = (fxVolumeIdx / 10.0f); } |