|
Starsector API
|
Static Public Member Functions | |
| static void | loadIfNeeded () |
| static void | saveIfNeeded () |
| static JSONObject | get () |
| static boolean | optBoolean (String key, boolean defaultValue) |
| static void | setBoolean (String key, boolean value) |
| static float | optFloat (String key, float defaultValue) |
| static void | setFloat (String key, float value) |
| static int | optInt (String key, int defaultValue) |
| static void | setInt (String key, int value) |
| static String | optString (String key, String defaultValue) |
| static void | setString (String key, String value) |
| static void | unset (String key) |
Static Public Attributes | |
| static String | SETTINGS_DATA_FILE = "core_shared_settings.json" |
Static Protected Attributes | |
| static JSONObject | json = new JSONObject() |
Generally meant for UI settings that are shared across multiple campaigns.
"Was this checkbox checked last time this dialog was closed", etc. In some cases that should be tracked per-campaign, but in some cases it makes sense for this to be shared.
The amount of data stored here should be small and bounded (i.e. not growing indefinitely).
Code using this should assume the data stored here may be lost (e.g. due to the common folder being deleted) and handle this/recover gracefully.
Definition at line 24 of file SharedSettings.java.
|
static |
Definition at line 64 of file SharedSettings.java.
|
static |
Definition at line 42 of file SharedSettings.java.
|
static |
Definition at line 69 of file SharedSettings.java.
|
static |
Definition at line 80 of file SharedSettings.java.
|
static |
Definition at line 91 of file SharedSettings.java.
|
static |
Definition at line 102 of file SharedSettings.java.
|
static |
Definition at line 54 of file SharedSettings.java.
|
static |
Definition at line 72 of file SharedSettings.java.
|
static |
Definition at line 83 of file SharedSettings.java.
|
static |
Definition at line 94 of file SharedSettings.java.
|
static |
Definition at line 105 of file SharedSettings.java.
|
static |
Definition at line 113 of file SharedSettings.java.
|
staticprotected |
Definition at line 27 of file SharedSettings.java.
|
static |
Definition at line 25 of file SharedSettings.java.