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

Display a description for the currently selected value in enum property inspector tooltips #6154

Closed
Calinou opened this issue Jan 23, 2023 · 2 comments · Fixed by godotengine/godot#76238

Comments

@Calinou
Copy link
Member

Calinou commented Jan 23, 2023

Describe the project you are working on

The Godot editor 🙂

Describe the problem or limitation you are having in your project

In the inspector, hovering a property displays a description. However, for enum properties, this is limited to the property, not its value:

Screenshot_20230123_190309

This can be inconvenient, as you manually have to go to the class reference to check the associated constant's description.

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

Display a description for the currently selected value in enum property inspector tooltips.

Some constant descriptions can take a lot of space, so I recommend only displaying a description for the currently selected value, rather than all of them.

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

Modify EditorHelpBit to display the description of the constant that matches the enum's value in the inspector.

The result should look like this:1

Screenshot_20230123_190858

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

No.

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

This is about improving editor usability and documentation discoverability out of the box.

Footnotes

  1. This is just a mockup made by modifying the class reference XML for that property, not an actual implementation.

@RedMser
Copy link

RedMser commented Jan 23, 2023

Since tooltips can also be added to individual OptionButton items, I propose this as an alternative implementation to avoid having to select each item just to see their documentation.

@Calinou
Copy link
Member Author

Calinou commented Jan 23, 2023

Since tooltips can also be added to individual OptionButton items, I propose this as an alternative implementation to avoid having to select each item just to see their documentation.

I've thought about that too, but it would require custom tooltips for individual OptionButton items if you want to preserve formatting that can only be displayed by EditorHelpBit (not standard tooltips).

Alternatively, you could strip formatting and use default tooltips for OptionButton items.

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

Successfully merging a pull request may close this issue.

2 participants