aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZach Jordan <zjordan58@fairport.org>2023-05-16 08:52:37 -0400
committerZach Jordan <zjordan58@fairport.org>2023-05-16 08:52:37 -0400
commit87fd445f70d578d2d7d75f1dab2f22142c3f673e (patch)
tree94272c200e6ee46eb4d84ba487c1b09bc3d4e18b
parent4c735b64005291173a324d555af6e8a9df8b939e (diff)
downloadNPEhero-87fd445f70d578d2d7d75f1dab2f22142c3f673e.tar.gz
NPEhero-87fd445f70d578d2d7d75f1dab2f22142c3f673e.tar.bz2
NPEhero-87fd445f70d578d2d7d75f1dab2f22142c3f673e.zip
json file reader and java library for json support
-rw-r--r--.classpath1
-rw-r--r--lib/json-simple-1.1.1.jarbin0 -> 23737 bytes
-rw-r--r--src/gui/JsonReader.java7
-rw-r--r--src/gui/JsonStructure.java5
-rw-r--r--src/gui/JsonWriter.java3
-rw-r--r--src/gui/SettingsController.java30
6 files changed, 41 insertions, 5 deletions
diff --git a/.classpath b/.classpath
index 7167265..fa58abd 100644
--- a/.classpath
+++ b/.classpath
@@ -14,5 +14,6 @@
<classpathentry kind="lib" path="lib/windows/lib/javafx.swing.jar"/>
<classpathentry kind="lib" path="lib/windows/lib/javafx.web.jar"/>
<classpathentry kind="lib" path="lib/windows/lib/javafx-swt.jar"/>
+ <classpathentry kind="lib" path="lib/json-simple-1.1.1.jar"/>
<classpathentry kind="output" path="bin"/>
</classpath>
diff --git a/lib/json-simple-1.1.1.jar b/lib/json-simple-1.1.1.jar
new file mode 100644
index 0000000..66347a6
--- /dev/null
+++ b/lib/json-simple-1.1.1.jar
Binary files differ
diff --git a/src/gui/JsonReader.java b/src/gui/JsonReader.java
index b1da06f..737e999 100644
--- a/src/gui/JsonReader.java
+++ b/src/gui/JsonReader.java
@@ -1,5 +1,10 @@
package gui;
-public interface JsonReader {
+import java.io.Closeable;
+public interface JsonReader extends Closeable
+{
+ public void close();
+ public JsonStructure read();
+
}
diff --git a/src/gui/JsonStructure.java b/src/gui/JsonStructure.java
index 1ea2fa1..208e79c 100644
--- a/src/gui/JsonStructure.java
+++ b/src/gui/JsonStructure.java
@@ -1,5 +1,8 @@
package gui;
-public interface JsonStructure {
+
+
+public interface JsonStructure extends JsonValue
+{
}
diff --git a/src/gui/JsonWriter.java b/src/gui/JsonWriter.java
index 04fae8e..2b1ab72 100644
--- a/src/gui/JsonWriter.java
+++ b/src/gui/JsonWriter.java
@@ -1,5 +1,6 @@
package gui;
-public interface JsonWriter {
+public interface JsonWriter
+{
}
diff --git a/src/gui/SettingsController.java b/src/gui/SettingsController.java
index 8898dc3..965ac61 100644
--- a/src/gui/SettingsController.java
+++ b/src/gui/SettingsController.java
@@ -1,5 +1,31 @@
package gui;
+import org.json.simple.JSONObject;
+import java.util.Map;
+import java.util.HashMap;
-public class SettingsController {
-
+public class SettingsController
+{
+ private int effectsVol;
+ private int musicVol;
+ private boolean fullscreen;
+
+ public SettingsController()
+ {
+ readFile();
+ }
+
+ public void saveAndWrite(int newEffVol, int newMusVol, boolean isFull)
+ {
+ effectsVol = newEffVol;
+ musicVol = newMusVol;
+ fullscreen = isFull;
+
+
+ }
+
+ public void readFile()
+ {
+
+ }
+
}