22 lines
540 B
GDScript3
Raw Normal View History

2024-01-14 11:22:14 +00:00
extends Node
func _ready():
# Capture mouse
#Input.mouse_mode = Input.MOUSE_MODE_CAPTURED
# Mute audio
var master_sound = AudioServer.get_bus_index("Master")
AudioServer.set_bus_mute(master_sound, true)
func _input(event):
if event.is_action_pressed("toggle_fullscreen"):
var mode = DisplayServer.window_get_mode()
match mode:
DisplayServer.WINDOW_MODE_FULLSCREEN:
DisplayServer.window_set_mode(DisplayServer.WINDOW_MODE_WINDOWED)
_:
DisplayServer.window_set_mode(DisplayServer.WINDOW_MODE_FULLSCREEN)
return