1
0
Fork 0
mirror of https://github.com/Orama-Interactive/Pixelorama.git synced 2025-01-30 23:19:49 +00:00

Add enter and escape as input actions

This commit is contained in:
Manolis Papadeas 2021-04-23 23:47:42 +03:00
parent afd7cc43c9
commit 320c538bc3
2 changed files with 14 additions and 3 deletions

View file

@ -534,6 +534,17 @@ right_magic_wand_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":81,"unicode":0,"echo":false,"script":null)
]
}
enter={
"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":16777221,"unicode":0,"echo":false,"script":null)
, Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":16777222,"unicode":0,"echo":false,"script":null)
]
}
escape={
"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":16777217,"unicode":0,"echo":false,"script":null)
]
}
[locale]

View file

@ -78,10 +78,10 @@ func _ready() -> void:
func _input(event : InputEvent) -> void:
if event is InputEventKey:
if is_moving_content: # Temporary code
if event.scancode == 16777221: # Enter
if is_moving_content:
if Input.is_action_just_pressed("enter"):
transform_content_confirm()
elif event.scancode == 16777217: # Escape
elif Input.is_action_just_pressed("escape"):
transform_content_cancel()
elif event is InputEventMouse:
var gizmo : Gizmo