diff --git a/core/src/mindustry/ui/dialogs/SettingsMenuDialog.java b/core/src/mindustry/ui/dialogs/SettingsMenuDialog.java index dccf2dadcb96..7c6ed01a3871 100644 --- a/core/src/mindustry/ui/dialogs/SettingsMenuDialog.java +++ b/core/src/mindustry/ui/dialogs/SettingsMenuDialog.java @@ -287,7 +287,8 @@ void addSettings(){ sound.sliderPref("sfxvol", bundle.get("setting.sfxvol.name", "SFX Volume"), 100, 0, 100, 1, i -> i + "%"); sound.sliderPref("ambientvol", bundle.get("setting.ambientvol.name", "Ambient Volume"), 100, 0, 100, 1, i -> i + "%"); - game.screenshakePref(); + game.sliderPref("saveinterval", 60, 10, 5 * 120, 10, i -> Core.bundle.format("setting.seconds", i)); + if(mobile){ game.checkPref("autotarget", true); game.checkPref("keyboard", false, val -> { @@ -308,7 +309,6 @@ void addSettings(){ control.setInput(new MobileInput()); } }*/ - game.sliderPref("saveinterval", 60, 10, 5 * 120, 10, i -> Core.bundle.format("setting.seconds", i)); if(!mobile){ game.checkPref("crashreport", true); @@ -351,6 +351,8 @@ void addSettings(){ Core.settings.put("uiscalechanged", s != lastUiScale[0]); return s + "%"; }); + + graphics.sliderPref("screenshake", 4, 0, 8, i -> (i / 4f) + "x"); graphics.sliderPref("fpscap", 240, 15, 245, 5, s -> (s > 240 ? Core.bundle.get("setting.fpscap.none") : Core.bundle.format("setting.fpscap.text", s))); graphics.sliderPref("chatopacity", 100, 0, 100, 5, s -> s + "%"); graphics.sliderPref("lasersopacity", 100, 0, 100, 5, s -> { @@ -560,10 +562,6 @@ public void pref(Setting setting){ rebuild(); } - public void screenshakePref(){ - sliderPref("screenshake", bundle.get("setting.screenshake.name", "Screen Shake"), 4, 0, 8, i -> (i / 4f) + "x"); - } - public SliderSetting sliderPref(String name, String title, int def, int min, int max, StringProcessor s){ return sliderPref(name, title, def, min, max, 1, s); } @@ -701,7 +699,7 @@ public void add(SettingsTable table){ slider.change(); - table.stack(slider, value).width(420f).left().padTop(4); + table.stack(slider, value).width(Math.min(Core.graphics.getWidth() / 1.2f, 460f)).left().padTop(4); table.row(); } }