extends Node

@onready var audio_player: AudioStreamPlayer = $AudioStreamPlayer

var is_fullscreen = false
var is_muted = false

func _input(event):
	if event is InputEventKey and event.pressed:
		# Toggle fullscreen with F
		if event.keycode == KEY_F:
			is_fullscreen = !is_fullscreen
			if is_fullscreen:
				DisplayServer.window_set_mode(DisplayServer.WindowMode.WINDOW_MODE_FULLSCREEN)
			else:
				DisplayServer.window_set_mode(DisplayServer.WindowMode.WINDOW_MODE_WINDOWED)
		
		# Toggle mute with M
		elif event.keycode == KEY_M:
			is_muted = !is_muted
			audio_player.stream_paused = is_muted
