From a14862a6bc0dbb1ae78cd4e2e4795d4194772583 Mon Sep 17 00:00:00 2001 From: sowgro Date: Mon, 5 Jun 2023 00:34:16 -0400 Subject: rewrote everything related to sound --- src/main/SettingsController.java | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'src/main/SettingsController.java') diff --git a/src/main/SettingsController.java b/src/main/SettingsController.java index 4bd2b24..36fda40 100644 --- a/src/main/SettingsController.java +++ b/src/main/SettingsController.java @@ -9,12 +9,13 @@ import org.json.simple.JSONObject; import org.json.simple.parser.JSONParser; import org.json.simple.parser.ParseException; +import javafx.beans.property.SimpleDoubleProperty; import javafx.beans.property.SimpleIntegerProperty; public class SettingsController { - public SimpleIntegerProperty effectsVol = new SimpleIntegerProperty(0); - public SimpleIntegerProperty musicVol = new SimpleIntegerProperty(0); + public SimpleDoubleProperty effectsVol = new SimpleDoubleProperty(1); + public SimpleDoubleProperty musicVol = new SimpleDoubleProperty(1); private JSONObject settings; public void read() throws ParseException @@ -27,8 +28,8 @@ public class SettingsController settings = (JSONObject)(obj); //converts read object to a JSONObject - effectsVol.set((int) settings.get("effectsVol")); - musicVol.set((int) settings.get("musicVol")); + effectsVol.set((double) settings.get("effectsVol")); + musicVol.set((double) settings.get("musicVol")); } catch (FileNotFoundException e) { -- cgit v1.2.3