Add F11 to toggle fullscreen

Part of #21
This commit is contained in:
Nathan Lovato 2020-02-11 12:51:21 -06:00
parent 7e98b2e785
commit 9870e03e81
2 changed files with 13 additions and 0 deletions

View File

@ -11,6 +11,12 @@ func _ready() -> void:
button_go_back.connect("pressed", self, "_on_ButtonGoBack_pressed")
func _input(event: InputEvent) -> void:
if event.is_action_pressed("toggle_fullscreen"):
OS.window_fullscreen = not OS.window_fullscreen
get_tree().set_input_as_handled()
func _on_DemoPickerUI_demo_requested() -> void:
demo_player.load_demo(demo_picker.demo_path)
demo_picker.hide()

View File

@ -200,6 +200,8 @@ config/icon="res://icon.png"
[display]
window/size/width=1920
window/size/height=1080
window/size/always_on_top=true
[input]
@ -228,6 +230,11 @@ sf_down={
, Object(InputEventJoypadMotion,"resource_local_to_scene":false,"resource_name":"","device":0,"axis":1,"axis_value":1.0,"script":null)
]
}
toggle_fullscreen={
"deadzone": 0.5,
"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":16777254,"unicode":0,"echo":false,"script":null)
]
}
[rendering]