From d6cdfb1b7e40890f6521f67198d13d2c575a90f2 Mon Sep 17 00:00:00 2001 From: IcECreAm777 Date: Sun, 9 Jul 2023 13:58:39 +0200 Subject: cancelling drawing with right click --- Scripts/drawing.gd | 3 +++ 1 file changed, 3 insertions(+) (limited to 'Scripts/drawing.gd') diff --git a/Scripts/drawing.gd b/Scripts/drawing.gd index 61896f9..832c42d 100644 --- a/Scripts/drawing.gd +++ b/Scripts/drawing.gd @@ -23,6 +23,9 @@ func _input(event): if drawing and event is InputEventMouseMotion: line.add_point(event.position) path.curve.add_point(event.position) + if event is InputEventMouseButton and event.button_index == MOUSE_BUTTON_RIGHT: + drawing = false + reset() func reset(): -- cgit