فهرست منبع

:sparkles: taking initial fullscreen mode from project settings

Felix Bytow 10 ماه پیش
والد
کامیت
7a35517074
2فایلهای تغییر یافته به همراه4 افزوده شده و 4 حذف شده
  1. 4 1
      assets/autoload/global_input.gd
  2. 0 3
      screens/main_menu.gd

+ 4 - 1
assets/autoload/global_input.gd

@@ -1,6 +1,9 @@
 extends Node
 
-var fullscreen = false
+var fullscreen = ProjectSettings.get_setting("display/window/size/mode") in [
+	DisplayServer.WINDOW_MODE_EXCLUSIVE_FULLSCREEN,
+	DisplayServer.WINDOW_MODE_FULLSCREEN,
+]
 
 func _input(event: InputEvent):
 	if event.is_action_pressed("toggle_fullscreen"):

+ 0 - 3
screens/main_menu.gd

@@ -8,9 +8,6 @@ func _ready():
 	if OS.get_name() not in ["Windows", "macOS", "Linux"]:
 		quit_button.visible = false
 
-func _process(_delta):
-	print(get_viewport_rect().size)
-
 func _on_new_game_pressed():
 	pass # Replace with function body.