diff options
author | Zach Jordan <zxjordan5@gmail.com> | 2023-06-05 08:38:00 -0400 |
---|---|---|
committer | Zach Jordan <zxjordan5@gmail.com> | 2023-06-05 08:38:00 -0400 |
commit | b6826c6ba281366efc60e89d73d3b6f81d4f2b80 (patch) | |
tree | 4d4dc505eb71cd0306fc07b44928eec3f152572c /src/main/SettingsController.java | |
parent | 649bb51ed3d7a55fd136b511a96e008298db5c7b (diff) | |
parent | fc23e12aa682298a6845d0085f1d39dae1d9c5b6 (diff) | |
download | NPEhero-b6826c6ba281366efc60e89d73d3b6f81d4f2b80.tar.gz NPEhero-b6826c6ba281366efc60e89d73d3b6f81d4f2b80.tar.bz2 NPEhero-b6826c6ba281366efc60e89d73d3b6f81d4f2b80.zip |
Merge branch 'main' of https://gitlab.sowgro.net/guitarheros/guitarhero
Diffstat (limited to 'src/main/SettingsController.java')
-rw-r--r-- | src/main/SettingsController.java | 9 |
1 files changed, 5 insertions, 4 deletions
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)
{
|