Attention | Topic was automatically imported from the old Question2Answer platform. | |
Asked By | dfoxworks |
I have a TextureButton “buy” that signals to a script and a Label “quantity”:
Is it possible for the user to click and hold the mouse button on the TextureButton, and while holding down the Label does a label = label + 1?
Here’s what I have so far:
var temp_quantity = 0
func _on_buy_pressed():
temp_quantity = temp_quantity + 1
label_quantity.set_text(str(temp_quantity))
I want the label_quantity to keep increasing in number the longer the user has the texturebutton clicked/pressed. Is it possible to do this?
Thanks!