From 50098f7d3dbf6fd02c41b4a68722949f991a9e0e Mon Sep 17 00:00:00 2001 From: tpart Date: Sat, 29 Jun 2024 22:23:04 +0200 Subject: Add fullscreen button --- client/global.gd | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'client/global.gd') diff --git a/client/global.gd b/client/global.gd index 4d1139d2..38ddace9 100644 --- a/client/global.gd +++ b/client/global.gd @@ -117,6 +117,13 @@ func _init(): settings = load_dict("user://settings", default_settings) print("DONE LOADING") +func _input(event): + if Input.is_action_just_pressed("fullscreen"): + if DisplayServer.window_get_mode() != DisplayServer.WINDOW_MODE_FULLSCREEN: + DisplayServer.window_set_mode(DisplayServer.WINDOW_MODE_FULLSCREEN) + else: + DisplayServer.window_set_mode(DisplayServer.WINDOW_MODE_WINDOWED) + func save_profile(): save_dict("user://profile", profile) -- cgit v1.2.3-70-g09d2