aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--client/global.gd18
1 files changed, 15 insertions, 3 deletions
diff --git a/client/global.gd b/client/global.gd
index 6095a34d..5ba2c9d8 100644
--- a/client/global.gd
+++ b/client/global.gd
@@ -83,9 +83,21 @@ func _ready():
func _input(event):
if Input.is_action_just_pressed("fullscreen"):
- Global.set_setting("fullscreen", not Global.get_setting("fullscreen"))
- save_settings()
- update_fullscreen()
+ match Global.get_setting("fullscreen"):
+ 0:
+ # Keep setting
+ if DisplayServer.window_get_mode() == DisplayServer.WINDOW_MODE_FULLSCREEN:
+ DisplayServer.window_set_mode(DisplayServer.WINDOW_MODE_WINDOWED)
+ else:
+ DisplayServer.window_set_mode(DisplayServer.WINDOW_MODE_FULLSCREEN)
+ 1:
+ # Always
+ set_setting("fullscreen", 2) # Set to never
+ update_fullscreen()
+ 2:
+ # Never
+ set_setting("fullscreen", 1) # Set to always
+ update_fullscreen()
# Update using_joypad variable
if event is InputEventMouseButton or event is InputEventKey: