diff options
| author | ilotterytea <iltsu@alright.party> | 2022-12-10 05:12:52 +0600 |
|---|---|---|
| committer | ilotterytea <iltsu@alright.party> | 2022-12-10 05:12:52 +0600 |
| commit | 8f84ecd18432949d31d2bbe14f81c6108f733e20 (patch) | |
| tree | dec1229d20ef316f5ce46c03027f0dc7e0b008b6 /core | |
| parent | 6c52b6d5fe3d591012e0b0e6f1a7b56d9a2f60c2 (diff) | |
Apply button is now useful
Diffstat (limited to 'core')
| -rw-r--r-- | core/src/com/ilotterytea/maxoning/screens/MenuScreen.java | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/core/src/com/ilotterytea/maxoning/screens/MenuScreen.java b/core/src/com/ilotterytea/maxoning/screens/MenuScreen.java index 5d91fd5..7e3e8d8 100644 --- a/core/src/com/ilotterytea/maxoning/screens/MenuScreen.java +++ b/core/src/com/ilotterytea/maxoning/screens/MenuScreen.java @@ -281,7 +281,6 @@ public class MenuScreen implements Screen { boolean value = game.prefs.getBoolean("debug", false); game.prefs.putBoolean("debug", !value); - game.prefs.flush(); value = !value; @@ -311,7 +310,6 @@ public class MenuScreen implements Screen { boolean value = game.prefs.getBoolean("music", true); game.prefs.putBoolean("music", !value); - game.prefs.flush(); value = !value; @@ -337,7 +335,6 @@ public class MenuScreen implements Screen { boolean value = game.prefs.getBoolean("sfx", true); game.prefs.putBoolean("sfx", !value); - game.prefs.flush(); value = !value; @@ -367,7 +364,6 @@ public class MenuScreen implements Screen { boolean value = game.prefs.getBoolean("vsync", true); game.prefs.putBoolean("vsync", !value); - game.prefs.flush(); value = !value; @@ -392,7 +388,6 @@ public class MenuScreen implements Screen { boolean value = game.prefs.getBoolean("fullscreen", true); game.prefs.putBoolean("fullscreen", !value); - game.prefs.flush(); value = !value; Dimension dim = Toolkit.getDefaultToolkit().getScreenSize(); @@ -427,7 +422,6 @@ public class MenuScreen implements Screen { game.locale = new I18N(fhNext); game.prefs.putString("lang", fhNext.nameWithoutExtension()); - game.prefs.flush(); String[] fh4Locale = fhNext.nameWithoutExtension().split("_"); Locale locale = new Locale(fh4Locale[0], fh4Locale[1]); @@ -503,6 +497,14 @@ public class MenuScreen implements Screen { actTable.add(closeBtn).pad(5f); TextButton saveBtn = new TextButton("Apply", skin); + + saveBtn.addListener(new ClickListener() { + @Override + public void clicked(InputEvent event, float x, float y) { + game.prefs.flush(); + } + }); + actTable.add(saveBtn).pad(5f); optionsTable.setY(-optionsTable.getHeight()); |
