-
-
Notifications
You must be signed in to change notification settings - Fork 21k
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
Make custom types more subtle and more useful #30697
Make custom types more subtle and more useful #30697
Conversation
Implements godotengine#6067 (aaronfranke's idea) Fixes godotengine#26980
d0322ca
to
4f72178
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.
Very nice! I can confirm this works with existing projects and has the expected behavior, with no noticeable problems.
Note that it only works with types added via add_custom_type
and not class_name
, which I actually think is ideal because it prevents user-made classes from showing up with faded scripts. It makes sense to only fade scripts for types added via plugins and add_custom_type
.
@@ -295,6 +304,9 @@ bool SceneTreeEditor::_add_nodes(Node *p_node, TreeItem *p_parent) { | |||
Ref<Script> script = p_node->get_script(); | |||
if (!script.is_null()) { | |||
item->add_button(0, get_icon("Script", "EditorIcons"), BUTTON_SCRIPT, false, TTR("Open Script:") + " " + script->get_path()); | |||
if (EditorNode::get_singleton()->get_object_custom_type_base(p_node) == script) { | |||
item->set_button_color(0, item->get_button_count(0) - 1, Color(1, 1, 1, 0.5)); |
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.
I would personally make it more transparent than 50%, since it's useful to know if you look closely but it's not something you usually need to see at a quick glance or when looking through your hierarchy. But this is open to discussion of course.
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.
I initially made it disabled (and unclickable), but then decided to only use the disabled style (which is 50% transparent) with a working button.
Thanks! |
THERE WAS MUCH REJOICING! |
Implements #6067 (comment) (@aaronfranke's idea).
Fixes #26980.
Also, makes custom type icons show in the AnimationPlayer editor.