mirror of
https://github.com/Orama-Interactive/Pixelorama.git
synced 2025-01-31 07:29:49 +00:00
Add enter and escape as input actions
This commit is contained in:
parent
afd7cc43c9
commit
320c538bc3
|
@ -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]
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue