diff options
author | Jérémy Zurcher <jeremy@asynk.ch> | 2016-02-09 23:27:54 +0100 |
---|---|---|
committer | Jérémy Zurcher <jeremy@asynk.ch> | 2016-02-09 23:27:54 +0100 |
commit | fd124f484050ae6ba75554e7398650b62b90b314 (patch) | |
tree | bdc456d37afa6bbeae2463503ae9d71cce359e61 /core/src/ch/asynk | |
parent | 32daf8c19f359a98bcb41019bd891e4c33b59654 (diff) | |
download | RustAndDust-fd124f484050ae6ba75554e7398650b62b90b314.zip RustAndDust-fd124f484050ae6ba75554e7398650b62b90b314.tar.gz |
load config at startup, unload it at options modifications
Diffstat (limited to 'core/src/ch/asynk')
-rw-r--r-- | core/src/ch/asynk/rustanddust/RustAndDust.java | 1 | ||||
-rw-r--r-- | core/src/ch/asynk/rustanddust/menu/OptionsMenu.java | 1 |
2 files changed, 2 insertions, 0 deletions
diff --git a/core/src/ch/asynk/rustanddust/RustAndDust.java b/core/src/ch/asynk/rustanddust/RustAndDust.java index a02974b..c558c6f 100644 --- a/core/src/ch/asynk/rustanddust/RustAndDust.java +++ b/core/src/ch/asynk/rustanddust/RustAndDust.java @@ -121,6 +121,7 @@ public class RustAndDust extends Game factory = new Factory(this); config = new Config(); backend.init(this); + config.load(db.loadConfig()); state = State.NONE; loadUiAssets(); diff --git a/core/src/ch/asynk/rustanddust/menu/OptionsMenu.java b/core/src/ch/asynk/rustanddust/menu/OptionsMenu.java index f5b5182..b947203 100644 --- a/core/src/ch/asynk/rustanddust/menu/OptionsMenu.java +++ b/core/src/ch/asynk/rustanddust/menu/OptionsMenu.java @@ -95,6 +95,7 @@ public class OptionsMenu extends Patch game.config.debug = checkValues[0]; game.config.fxVolume = (fxVolumeIdx / 10.0f); game.config.graphics = game.config.graphics.get(graphicsIdx); + game.db.storeConfig(game.config.unload()); return true; } |