+1 vote

ItemList - how to disable tooltip?

image

in Engine by (361 points)

3 Answers

+1 vote

I just had a look at the implementation of ItemList.get_tooltip(pos): https://github.com/godotengine/godot/blob/master/scene/gui/item_list.cpp#L1196

If the tooltip is empty, the item text is returned. So it looks like you can't set an empty tooltip, and even then it would still be shown.

Also I don't see any option to disable tooltips either in ItemList or Control, so you might want to create an issue on Github if it's a blocking problem for you.

by (29,120 points)

Thanks, I wrote on github.

+1 vote

You can disable tooltip if you compile templates with special option.

scons platform=android disable_tooltip=yes

The tooltip will not appear after export your project with this template, but this will disable whole tooltips.

by (9,796 points)

I've never heard of that SCons build option – it's not available in recent Godot versions at least.

+2 votes

Late to the party but for everyone else having this question in the future, use itemList.set_item_tooltip_enabled(item_idx, false).

by (120 points)
Welcome to Godot Engine Q&A, where you can ask questions and receive answers from other members of the community.

Please make sure to read Frequently asked questions and How to use this Q&A? before posting your first questions.
Social login is currently unavailable. If you've previously logged in with a Facebook or GitHub account, use the I forgot my password link in the login box to set a password for your account. If you still can't access your account, send an email to [email protected] with your username.