summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--core/src/ch/asynk/rustanddust/game/Config.java2
-rw-r--r--core/src/ch/asynk/rustanddust/game/hud/OptionsPanel.java8
-rw-r--r--core/src/ch/asynk/rustanddust/menu/OptionsMenu.java5
3 files changed, 7 insertions, 8 deletions
diff --git a/core/src/ch/asynk/rustanddust/game/Config.java b/core/src/ch/asynk/rustanddust/game/Config.java
index 8545e73..fc2d1e9 100644
--- a/core/src/ch/asynk/rustanddust/game/Config.java
+++ b/core/src/ch/asynk/rustanddust/game/Config.java
@@ -61,6 +61,8 @@ public class Config
public float fxVolume;
public Graphics graphics;
+ public static String [] fxStrings = { "OFF", "10%", "20%", "30%", "40%", "50%", "60%", "70%", "80%", "90%", "ON" };
+
public Config()
{
this.gameMode = GameMode.SOLO;
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);
}
diff --git a/core/src/ch/asynk/rustanddust/menu/OptionsMenu.java b/core/src/ch/asynk/rustanddust/menu/OptionsMenu.java
index 6916714..6a6ef95 100644
--- a/core/src/ch/asynk/rustanddust/menu/OptionsMenu.java
+++ b/core/src/ch/asynk/rustanddust/menu/OptionsMenu.java
@@ -29,7 +29,6 @@ public class OptionsMenu extends Patch
"Show Targets",
"Show Moves",
};
- private String [] fxStrings = { "OFF", "10%", "20%", "30%", "40%", "50%", "60%", "70%", "80%", "90%", "ON" };
private float checkDy;
private Label title;
@@ -82,7 +81,7 @@ public class OptionsMenu extends Patch
checkValues[1] = game.config.showEnemyPossibilities;
checkValues[0] = game.config.debug;
fxVolumeIdx = (int) (game.config.fxVolume * 10);
- fxVolumeValue.write(fxStrings[fxVolumeIdx], fxVolumeValue.getX(), fxVolumeValue.getY());
+ fxVolumeValue.write(game.config.fxStrings[fxVolumeIdx], fxVolumeValue.getX(), fxVolumeValue.getY());
graphicsIdx = game.config.graphics.i;
graphicsValue.write(game.config.graphics.s, graphicsValue.getX(), graphicsValue.getY());
}
@@ -103,7 +102,7 @@ public class OptionsMenu extends Patch
{
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());
}
private void cycleGraphics()