mirror of
https://github.com/Orama-Interactive/Pixelorama.git
synced 2025-01-18 17:19:50 +00:00
Escape cancels polygon selection making
This commit is contained in:
parent
489749e305
commit
fd45344e6b
|
@ -18,6 +18,12 @@ func _input(event : InputEvent) -> void:
|
||||||
append_gap(_draw_points[-1], _draw_points[0], _draw_points)
|
append_gap(_draw_points[-1], _draw_points[0], _draw_points)
|
||||||
ready_to_apply = true
|
ready_to_apply = true
|
||||||
apply_selection(Vector2.ZERO) # Argument doesn't matter
|
apply_selection(Vector2.ZERO) # Argument doesn't matter
|
||||||
|
elif event is InputEventKey:
|
||||||
|
if event.is_action_pressed("escape") and _ongoing_selection:
|
||||||
|
_ongoing_selection = false
|
||||||
|
_draw_points.clear()
|
||||||
|
ready_to_apply = false
|
||||||
|
Global.canvas.previews.update()
|
||||||
|
|
||||||
|
|
||||||
func draw_start(position : Vector2) -> void:
|
func draw_start(position : Vector2) -> void:
|
||||||
|
|
Loading…
Reference in a new issue