mirror of
https://github.com/Orama-Interactive/Pixelorama.git
synced 2025-01-18 17:19:50 +00:00
Implement fullscreen toggle by pressing F11 or Alt + Enter
This commit is contained in:
parent
7318db30ab
commit
cfeb4213f5
|
@ -123,6 +123,9 @@ func _ready() -> void:
|
||||||
Global.brushes_from_files = Global.custom_brushes.size()
|
Global.brushes_from_files = Global.custom_brushes.size()
|
||||||
|
|
||||||
func _input(event):
|
func _input(event):
|
||||||
|
if event.is_action_pressed("toggle_fullscreen"):
|
||||||
|
OS.window_fullscreen = !OS.window_fullscreen
|
||||||
|
|
||||||
if Global.has_focus:
|
if Global.has_focus:
|
||||||
for t in tools: #Handle tool shortcuts
|
for t in tools: #Handle tool shortcuts
|
||||||
if event.is_action_pressed(t[2]): #Shortcut for right button (with Alt)
|
if event.is_action_pressed(t[2]): #Shortcut for right button (with Alt)
|
||||||
|
|
|
@ -165,6 +165,12 @@ right_lightdark_tool={
|
||||||
"events": [ Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":true,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":85,"unicode":0,"echo":false,"script":null)
|
"events": [ Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":true,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":85,"unicode":0,"echo":false,"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)
|
||||||
|
, Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":true,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":16777221,"unicode":0,"echo":false,"script":null)
|
||||||
|
]
|
||||||
|
}
|
||||||
|
|
||||||
[rendering]
|
[rendering]
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue