Add toggleable fullscreen

Closes: #171
This commit is contained in:
Henrique Campos 2020-01-24 10:22:58 -03:00
parent 92f8d67dc4
commit c59526cd1b
2 changed files with 7 additions and 0 deletions

View file

@ -290,6 +290,11 @@ DEBUG_die={
"events": [ Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":81,"unicode":0,"echo":false,"script":null)
]
}
toggle_full_screen={
"deadzone": 0.5,
"events": [ Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":true,"meta":false,"command":true,"pressed":false,"scancode":16777244,"unicode":0,"echo":false,"script":null)
]
}
[layer_names]

View file

@ -26,3 +26,5 @@ func _unhandled_input(event: InputEvent) -> void:
var last_checkpoint_name: String = visited_checkpoints[level.name].back()
var last_checkpoint: Area2D = level.get_node("Checkpoints/" + last_checkpoint_name)
$Player.state_machine.transition_to("Die", {last_checkpoint = last_checkpoint})
elif event.is_action_pressed("toggle_full_screen"):
OS.window_fullscreen = not OS.window_fullscreen