![]() |
Attention | Topic was automatically imported from the old Question2Answer platform. |
![]() |
Asked By | kylekyleton |
I have a series of the same kind of control nodes instanced in a row. I want to be able to click on one, hold down the mouse button, drag the cursor over three or four of them, release the mouse button, and have them all activate.
I’ve tried a number of methods, but the issue I keep running into is that the first button I click seems to hold on to the mouse input – in other words, while the mouse button is depressed, gui events are not registered by any other node.
func _ready():
connect("gui_input", self, "_on_Node_gui_input")
func _on_Node_gui_input(event):
if event is InputEventMouseButton and event.pressed:
# this message gets successfully printed
print("pressed")
# clicked control does something
func _on_Node_mouse_entered():
# doesn't print anything at all while mouse button is pressed down
print(r_index)
How can I get around this? What am I doing wrong?
Thanks