Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add a way to set a tooltip delay for specific node locally #4738

Open
filantus opened this issue Jun 24, 2022 · 2 comments
Open

Add a way to set a tooltip delay for specific node locally #4738

filantus opened this issue Jun 24, 2022 · 2 comments

Comments

@filantus
Copy link

Describe the project you are working on

UI improvement.

Describe the problem or limitation you are having in your project

Built-in function Object _make_custom_tooltip(for_text: String) virtual const it's a great thing.

But it's becomes useless in case if required to show tooltip instantly (or with non default delay) in some UI element (only).

Describe the feature / enhancement and how it helps to overcome the problem or limitation

Described above.

Describe how your proposal will work, with code, pseudo-code, mock-ups, and/or diagrams

For example add some property or/and some methods in node space like:

tooltip_delay
set_tooltip_delay(value: float)
get_tooltip_delay() -> float

If this enhancement will not be used often, can it be worked around with a few lines of script?

Workaround - set tooltip delay globally, but it's not allow to have different tooltip delays in different ui elements.

And actually even global tooltip delay change don't work right now. See: godotengine/godot#9030

Is there a reason why this should be core and not an add-on in the asset library?

Core UI improvement.

@Calinou
Copy link
Member

Calinou commented Jun 24, 2022

If you want to display a specific tooltip instantly, I think it's better to use a custom tooltip system for this. For instance, you can use a Label or RichTextLabel within a PanelContainer. The built-in tooltip system is intended to remain basic, and it mainly targets non-game applications.

A custom tooltip system also allows you to have transitions, formatting, and more.

@filantus
Copy link
Author

@Calinou Yep, thanks for advice. Actually i'm already did it (custom system). Though it took some time to overcome through some troubles.
But i'm also thinking it may be useful to have ability to set local tooltip delay (for built-in tooltips). Even for simple tooltips. And in non game apps too.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants