diff options
| author | Zach Jordan <zjordan58@fairport.org> | 2023-05-16 08:52:37 -0400 | 
|---|---|---|
| committer | Zach Jordan <zjordan58@fairport.org> | 2023-05-16 08:52:37 -0400 | 
| commit | 87fd445f70d578d2d7d75f1dab2f22142c3f673e (patch) | |
| tree | 94272c200e6ee46eb4d84ba487c1b09bc3d4e18b | |
| parent | 4c735b64005291173a324d555af6e8a9df8b939e (diff) | |
| download | NPEhero-87fd445f70d578d2d7d75f1dab2f22142c3f673e.tar.gz NPEhero-87fd445f70d578d2d7d75f1dab2f22142c3f673e.tar.bz2 NPEhero-87fd445f70d578d2d7d75f1dab2f22142c3f673e.zip | |
json file reader and java library for json support
Diffstat (limited to '')
| -rw-r--r-- | .classpath | 1 | ||||
| -rw-r--r-- | lib/json-simple-1.1.1.jar | bin | 0 -> 23737 bytes | |||
| -rw-r--r-- | src/gui/JsonReader.java | 7 | ||||
| -rw-r--r-- | src/gui/JsonStructure.java | 5 | ||||
| -rw-r--r-- | src/gui/JsonWriter.java | 3 | ||||
| -rw-r--r-- | src/gui/SettingsController.java | 30 | 
6 files changed, 41 insertions, 5 deletions
| @@ -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.jarBinary files differ new file mode 100644 index 0000000..66347a6 --- /dev/null +++ b/lib/json-simple-1.1.1.jar 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()
 +	{
 +		
 +	}
 +	
  }
 | 
