aboutsummaryrefslogtreecommitdiffstats
path: root/Scripts/drawing.gd
diff options
context:
space:
mode:
authorLibravatar IcECreAm777 <hgk.1998@googlemail.com>2023-07-09 13:58:39 +0200
committerLibravatar IcECreAm777 <hgk.1998@googlemail.com>2023-07-09 13:58:39 +0200
commitd6cdfb1b7e40890f6521f67198d13d2c575a90f2 (patch)
treec6768ebcd689f10afab6f2fc85ebf5de2f41015b /Scripts/drawing.gd
parentf1677fac1f7c7989a28d078498357c88f9f631f3 (diff)
download2023-d6cdfb1b7e40890f6521f67198d13d2c575a90f2.tar.gz
2023-d6cdfb1b7e40890f6521f67198d13d2c575a90f2.tar.bz2
2023-d6cdfb1b7e40890f6521f67198d13d2c575a90f2.zip
cancelling drawing with right click
Diffstat (limited to '')
-rw-r--r--Scripts/drawing.gd3
1 files changed, 3 insertions, 0 deletions
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():