aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/gui/SettingsController.java11
1 files changed, 5 insertions, 6 deletions
diff --git a/src/gui/SettingsController.java b/src/gui/SettingsController.java
index 39072ac..66da588 100644
--- a/src/gui/SettingsController.java
+++ b/src/gui/SettingsController.java
@@ -21,10 +21,6 @@ public class SettingsController
public void saveAndWrite(int newEffVol, int newMusVol, boolean isFull)
{
- effectsVol = newEffVol;
- musicVol = newMusVol;
- fullscreen = isFull;
-
}
@@ -36,8 +32,11 @@ public class SettingsController
{
Object obj = jsonParser.parse(reader);
- settings = (JSONObject)(obj); //converts read object to a JSONObjec
- effectsVol = settings.get("effectsVol");
+ settings = (JSONObject)(obj); //converts read object to a JSONObject
+
+ effectsVol = (int) settings.get("effectsVol");
+ musicVol = (int) settings.get("musicVol");
+ fullscreen = (boolean) settings.get("fullscreen");
}
catch (FileNotFoundException e)
{