summaryrefslogtreecommitdiff
path: root/components/button.gd
diff options
context:
space:
mode:
authorJonas Bernard <public.jbernard@web.de>2021-04-25 00:03:03 +0200
committerJonas Bernard <public.jbernard@web.de>2021-04-25 00:03:03 +0200
commit90f80eae757c6232b92561b63fee76ce202f374f (patch)
tree594b1b06c2214815ddc4e4576bf843ce183554b1 /components/button.gd
parent6faf61da2794de3f4407ef1113b840dc5120381b (diff)
downloadldjam48-90f80eae757c6232b92561b63fee76ce202f374f.tar.gz
ldjam48-90f80eae757c6232b92561b63fee76ce202f374f.tar.bz2
ldjam48-90f80eae757c6232b92561b63fee76ce202f374f.zip
introduction
Diffstat (limited to 'components/button.gd')
-rw-r--r--components/button.gd2
1 files changed, 2 insertions, 0 deletions
diff --git a/components/button.gd b/components/button.gd
index 4bce086..1171cbd 100644
--- a/components/button.gd
+++ b/components/button.gd
@@ -55,6 +55,8 @@ func _on_ButtonTest_input_event(viewport, event, shape_idx):
_set_pressed(false)
return
_set_pressed(true)
+ if not (event.button_index == BUTTON_LEFT):
+ return
emit_signal("on_click")
func _set_all_textures(l, m, r):