Attention | Topic was automatically imported from the old Question2Answer platform. | |
Asked By | RetroDan007 |
Hello friends. I have a child node of textureButom and I want to change the color of the label when I pass the mouse over it
Attention | Topic was automatically imported from the old Question2Answer platform. | |
Asked By | RetroDan007 |
Hello friends. I have a child node of textureButom and I want to change the color of the label when I pass the mouse over it
Reply From: | Shy_on |
in the Inspector,go to texture - hover - new gradient texture there u will be able to select a color of ur choice
Reply From: | Wakatta |
From the node tab connect the mouse_entered
and mouse_exited
signals to your script.
func on_Label_mouse_entered():
set_self_modulate(Color.RED)
func on_Label_mouse_exited():
set_self_modulate(Color.WHITE)
Reply From: | simonlee |
Instead of using a Label, you could use a LinkButton.
Using LinkButton, you can use a Theme Override, which allows you to set colors for Hover, Pressed, Focus, etc.