I made that when cursor hovers over the button it will change its texture, but I need it to send a signal that will show text with info about this button, how can I check mouse cursor hovering over the button?
How to check if the button is hovered with mouse
You can use button's mouse_entered()
and mouse_exited()
signals. However if you want to have something like a tooltip, all gui controls already have it built in. Just set the tooltip_text
property.
- Edited
xyz Sorry, I just inserted random things and found is_hovered() function. But about tooltips: can I somehow redact them and give another background or font? Cuz standart background or even blank ones is plain bad for me
- Edited
- Best Answerset by TraitPhoe
TraitPhoe You can customize it via a Theme or by overriding the _make_custom_tooltip()
. Check the docs for details.
Using is_hovered()
is also fine but it won't work for other types of controls. Besides, why doing manually something that's already supported out of the box.