_mouse_entered() funtion not triggered if the control is invisible

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By grymjack

_mouse_entered() will not trigger if the control has a value of visible=false. How can I get this to trigger while keeping the control invisible?

-Thank you


func _on_AButton_mouse_entered():
	# setting node name and moving
	var button_path = "../UpperWireframeBox/AButton"
	var temp_node = get_node(button_path)
	temp_node.visible = true
:bust_in_silhouette: Reply From: clotet

I think this is the intended behaviour. Maybe you can keep the button visible, but change the modulate property to transparent alpha, and then change to white to make it visible.

modulate will affect the node and its children, and self_modulate will change visibility only for the node itself.

Thank you for answering. I will give it a try and see how it works.

grymjack | 2023-05-27 21:46