Fullscreen key / Bugfixes
This commit is contained in:
@@ -396,6 +396,17 @@ public class Control implements ApplicationListener{
|
||||
music.update();
|
||||
loops.update();
|
||||
|
||||
if(Core.input.keyTap(Binding.fullscreen)){
|
||||
boolean full = settings.getBool("fullscreen");
|
||||
if(full){
|
||||
graphics.setWindowedMode(graphics.getWidth(), graphics.getHeight());
|
||||
}else{
|
||||
graphics.setFullscreenMode(graphics.getDisplayMode());
|
||||
}
|
||||
settings.put("fullscreen", !full);
|
||||
settings.save();
|
||||
}
|
||||
|
||||
if(!state.is(State.menu)){
|
||||
input.update();
|
||||
|
||||
|
||||
@@ -21,6 +21,7 @@ public enum Binding implements KeyBind{
|
||||
zoom_hold(KeyCode.CONTROL_LEFT, "view"),
|
||||
zoom(new Axis(KeyCode.SCROLL)),
|
||||
menu(Core.app.getType() == ApplicationType.Android ? KeyCode.BACK : KeyCode.ESCAPE),
|
||||
fullscreen(KeyCode.F11),
|
||||
pause(KeyCode.SPACE),
|
||||
minimap(KeyCode.M),
|
||||
toggle_menus(KeyCode.C),
|
||||
|
||||
@@ -198,7 +198,7 @@ public class SettingsMenuDialog extends SettingsDialog{
|
||||
}
|
||||
return s + "%";
|
||||
});
|
||||
graphics.sliderPref("fpscap", 241, 5, 241, 5, s -> (s > 240 ? Core.bundle.get("setting.fpscap.none") : Core.bundle.format("setting.fpscap.text", s)));
|
||||
graphics.sliderPref("fpscap", 240, 5, 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 + "%");
|
||||
|
||||
if(!mobile){
|
||||
@@ -207,7 +207,7 @@ public class SettingsMenuDialog extends SettingsDialog{
|
||||
if(b){
|
||||
Core.graphics.setFullscreenMode(Core.graphics.getDisplayMode());
|
||||
}else{
|
||||
Core.graphics.setWindowedMode(600, 480);
|
||||
Core.graphics.setWindowedMode(Core.graphics.getWidth(), Core.graphics.getHeight());
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user