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

Editor: Inspector and Signal docks improvements #81221

Conversation

dalexeev
Copy link
Member

@dalexeev dalexeev commented Sep 1, 2023

1. Fixes a part of #78934 (no description for properties after @export_category).

There is now a way (hint_string) to distinguish type categories from custom categories. This is consistent with scripts, they already use hint_string.

p_list->push_back(PropertyInfo(Variant::NIL, get_class_static(), PROPERTY_HINT_NONE, String(), PROPERTY_USAGE_CATEGORY)); \

return PropertyInfo(Variant::NIL, scr_name, PROPERTY_HINT_NONE, path, PROPERTY_USAGE_CATEGORY);

extends Node
@export var a: int
@export_category("Node")
@export var b: int

Also we can make the background a bit less bright than normal categories.

2. Added a tooltip when hovering a class item in the Signal dock, to be consistent with the Inspector.

3. Added "Open Documentation" context menu for classes to Inspector and Signal docks.

4. Fixed a bug with displaying incorrect tooltips for callback items.

Before:

After:

5. Fixed a bug where descriptions could be truncated if they contain :: (the maxsplit argument for String.split() is now specified)

@dalexeev dalexeev added this to the 4.2 milestone Sep 1, 2023
@dalexeev dalexeev requested review from a team September 1, 2023 11:16
@dalexeev dalexeev requested a review from a team as a code owner September 1, 2023 11:17
@dalexeev dalexeev force-pushed the editor-inspector-and-signal-dock-improvements branch from fca337b to 614a557 Compare September 1, 2023 11:32
Copy link
Contributor

@YuriSizov YuriSizov left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just a debug print and a bit of cleaning, but code looks good otherwise.

The addition of the hint string seems safe to me, as far as core changes are.

@dalexeev dalexeev force-pushed the editor-inspector-and-signal-dock-improvements branch from 614a557 to c33ca26 Compare September 2, 2023 05:55
Copy link
Member

@akien-mga akien-mga left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me.

@akien-mga akien-mga merged commit fa3428f into godotengine:master Sep 2, 2023
16 checks passed
@akien-mga
Copy link
Member

Thanks!

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

Successfully merging this pull request may close these issues.

GDScript 2.0: @export_category interferes with the property inspector tooltip
3 participants