In my game, I’m using an ItemList node as part of an inventory, the thing is, I want to trigger an event when an item is being hovered. From what I’ve seen in the docs, there aren’t any methods that provide hover detection for items inside this node. What would be the best way of approaching this?
Also, by default, the ItemList seems to create a pop-up label for every item that is hovered for a few seconds. Is there any way to disable this pop-up?
I believe that ItemLists are inheriting from the Control class, which means they have access to the mouse_entered/exited signals which can be used to code custom hover/unhover behavior.
As for the tooltip that is displayed on mouse hover, did you check the Control → Tooltip property, is it empty?
If there is nothing, then you can probably change it via code set_item_tooltip(index, string) or completely disable it via set_item_tooltip_enabled(index, bool)
Thanks for the answer,
Regarding the tooltip, using set_item_tooltip_enabled worked just fine, I just need to do it for every item that gets added.
However, while the actual ItemList node can use the mouse_entered signal, this one just detects if the mouse has entered the whole ItemList container, not individual items. The signal doesn’t contain any parameters, so I guess this just detects if the mouse has entered the ItemList, not a specific item.