Implement fullscreen toggle by pressing F11 or Alt + Enter

This commit is contained in:
Hugo Locurcio 2019-11-19 22:33:37 +01:00
parent 7318db30ab
commit cfeb4213f5
No known key found for this signature in database
GPG key ID: 39E8F8BE30B0A49C
2 changed files with 9 additions and 0 deletions

View file

@ -123,6 +123,9 @@ func _ready() -> void:
Global.brushes_from_files = Global.custom_brushes.size()
func _input(event):
if event.is_action_pressed("toggle_fullscreen"):
OS.window_fullscreen = !OS.window_fullscreen
if Global.has_focus:
for t in tools: #Handle tool shortcuts
if event.is_action_pressed(t[2]): #Shortcut for right button (with Alt)