From 005c645b3cd991079dfd9bac2f207cdd2068d161 Mon Sep 17 00:00:00 2001 From: sowgro Date: Tue, 23 May 2023 00:39:57 -0400 Subject: finish gui, add new leaderboard system, redesign settings, switch lists to tables --- src/main/SettingsController.java | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'src/main/SettingsController.java') 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) -- cgit v1.2.3