aboutsummaryrefslogtreecommitdiff
path: root/src/main/SettingsController.java
diff options
context:
space:
mode:
authorsowgro <tpoke.ferrari@gmail.com>2023-05-23 00:39:57 -0400
committersowgro <tpoke.ferrari@gmail.com>2023-05-23 00:39:57 -0400
commit005c645b3cd991079dfd9bac2f207cdd2068d161 (patch)
treeed82f11d248a1a0e08ea0ed82380913250a0f278 /src/main/SettingsController.java
parentf941b529f1cb12312041516e6799ece0f6df2cac (diff)
downloadNPEhero-005c645b3cd991079dfd9bac2f207cdd2068d161.tar.gz
NPEhero-005c645b3cd991079dfd9bac2f207cdd2068d161.tar.bz2
NPEhero-005c645b3cd991079dfd9bac2f207cdd2068d161.zip
finish gui, add new leaderboard system, redesign settings, switch lists to tables
Diffstat (limited to '')
-rw-r--r--src/main/SettingsController.java10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/main/SettingsController.java b/src/main/SettingsController.java
index f767570..2e2d988 100644
--- a/src/main/SettingsController.java
+++ b/src/main/SettingsController.java
@@ -12,10 +12,12 @@ import org.json.simple.JSONArray;
import org.json.simple.parser.JSONParser;
import org.json.simple.parser.ParseException;
+import javafx.beans.property.SimpleIntegerProperty;
+
public class SettingsController
{
- private int effectsVol;
- private int musicVol;
+ public SimpleIntegerProperty effectsVol = new SimpleIntegerProperty(0);
+ public SimpleIntegerProperty musicVol = new SimpleIntegerProperty(0);
private boolean fullscreen;
private JSONObject settings;
@@ -34,8 +36,8 @@ public class SettingsController
settings = (JSONObject)(obj); //converts read object to a JSONObject
- effectsVol = (int) settings.get("effectsVol");
- musicVol = (int) settings.get("musicVol");
+ effectsVol.set((int) settings.get("effectsVol"));
+ musicVol.set((int) settings.get("musicVol"));
fullscreen = (boolean) settings.get("fullscreen");
}
catch (FileNotFoundException e)