aboutsummaryrefslogtreecommitdiff
path: root/src/gui
diff options
context:
space:
mode:
authorZach Jordan <zjordan58@fairport.org>2023-05-17 08:55:33 -0400
committerZach Jordan <zjordan58@fairport.org>2023-05-17 08:55:33 -0400
commit6e58f0c2ea47c33555e236c5f3bcb64a89c633fc (patch)
tree6f530ef5c8cac3a2d5d26700456f325e5d751432 /src/gui
parentbfc04de7027e476b22f1201d25b7d9a1f505201c (diff)
downloadNPEhero-6e58f0c2ea47c33555e236c5f3bcb64a89c633fc.tar.gz
NPEhero-6e58f0c2ea47c33555e236c5f3bcb64a89c633fc.tar.bz2
NPEhero-6e58f0c2ea47c33555e236c5f3bcb64a89c633fc.zip
yay
Diffstat (limited to 'src/gui')
-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)
{