move fullscreen toogle to state
This commit is contained in:
parent
bbe3fe60d1
commit
3322248384
10
src/main.gd
10
src/main.gd
|
|
@ -107,13 +107,3 @@ func start_demo():
|
|||
load_save(SaveGame.new())
|
||||
$DemoMenue.hide()
|
||||
current_room.start_room()
|
||||
|
||||
var last_mode := DisplayServer.WINDOW_MODE_WINDOWED
|
||||
func _unhandled_input(event: InputEvent) -> void:
|
||||
if event.is_action_pressed("toggle_fullscreen"):
|
||||
|
||||
if DisplayServer.window_get_mode() == DisplayServer.WINDOW_MODE_FULLSCREEN:
|
||||
DisplayServer.window_set_mode(last_mode)
|
||||
else:
|
||||
last_mode = DisplayServer.window_get_mode()
|
||||
DisplayServer.window_set_mode(DisplayServer.WINDOW_MODE_FULLSCREEN)
|
||||
|
|
|
|||
Loading…
Reference in New Issue