Add support for adding icons and tooltips to Tree title columns #8331
Replies: 1 comment
-
Sometimes posting alternatives or workarounds is useful, in particular if the issue or proposal comes from a time critical project. This is not to encourage a workaround culture, but... Since you seem to be in a hurry, here goes mine: can you do this with an emoji font? Addendum 1: Ok, that won't work for the tooltip. Addendum 2: Looking at the source code, it is using custom drawing. I think we could modify get_tooltip to check if the mouse is hovering on the title, the same way the code checks if the tile is being hovered to draw it (https://github.com/godotengine/godot/blob/6afd320984cf14198368cc6c53752813a02169e3/scene/gui/tree.cpp#L4202). |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Describe the project you are working on
Custom Editor UI
Describe the problem or limitation you are having in your project
In case of a single checkbox wide column, an icon is better than a text title.
And also tooltips for that icon.
Describe the feature / enhancement and how it helps to overcome the problem or limitation
Allow draw a icon to the Tree's title, and add tooltip to it.
Describe how your proposal will work, with code, pseudo-code, mock-ups, and/or diagrams
(image from my unity project)
add methods to Tree:
SetColumnIcon (columnIndex, icon);
SetColumnTooltip (columnIndex, tooltip);
If this enhancement will not be used often, can it be worked around with a few lines of script?
icon: use a emoji font may work
tooltip: no idea
Is there a reason why this should be core and not an add-on in the asset library?
maintain a emoji font for this purpose is too complicated
Beta Was this translation helpful? Give feedback.
All reactions