diff options
author | sowgro <tpoke.ferrari@gmail.com> | 2023-06-05 00:34:16 -0400 |
---|---|---|
committer | sowgro <tpoke.ferrari@gmail.com> | 2023-06-05 00:34:16 -0400 |
commit | a14862a6bc0dbb1ae78cd4e2e4795d4194772583 (patch) | |
tree | 88db04cdcc76454ae0f0025a9249270fab45ee22 /src/main/SettingsController.java | |
parent | d87a87aabde8b4011910dfed731362b7cf0b6b24 (diff) | |
download | NPEhero-a14862a6bc0dbb1ae78cd4e2e4795d4194772583.tar.gz NPEhero-a14862a6bc0dbb1ae78cd4e2e4795d4194772583.tar.bz2 NPEhero-a14862a6bc0dbb1ae78cd4e2e4795d4194772583.zip |
rewrote everything related to sound
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)
{
|