-
-
Notifications
You must be signed in to change notification settings - Fork 21.1k
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
Show valid types in SceneTreeDialog #79593
Conversation
1fb52f8
to
b9b30ca
Compare
b9b30ca
to
a5aad8a
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tested locally (rebased on top of master
e8aa8c1), it works as expected.
Code looks good to me at a glance.
editor/gui/scene_tree_editor.cpp
Outdated
TextureRect *trect = memnew(TextureRect); | ||
hflow->add_child(trect); | ||
trect->set_expand_mode(TextureRect::EXPAND_IGNORE_SIZE); | ||
trect->set_stretch_mode(TextureRect::STRETCH_KEEP_ASPECT_CENTERED); | ||
trect->set_meta("type", type); | ||
valid_type_icons.push_back(trect); | ||
|
||
Label *label = memnew(Label); | ||
hflow->add_child(label); | ||
label->set_text(type); | ||
label->set_auto_translate(false); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One thing needs addressing, otherwise should be good.
I'm a bit concerned about the usability if you have many different types listed, but I guess we can assume this to be a rare/edge case.
a5aad8a
to
44d2fab
Compare
You have shadowing issues 🙃 |
44d2fab
to
05ab444
Compare
Thanks! |
When picking node for Node/NodePath property, allowed type is now displayed at the top:
Multiple types:
Closes #62483