-
-
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
[Editor] Update SceneUniqueName button text for clarity #98745
base: master
Are you sure you want to change the base?
Conversation
45b75eb
to
ca2ceff
Compare
I think the same button showing different hint text depending on the context might be unexpected by many users. It could be harmonized into more precise language, for example:
|
ca2ceff
to
a66d3bb
Compare
I do like this combined language, however I fear users may not understand what ownership really is, but maybe that's not the problem to try and solve. Thoughts on?
I would also be just as happy if the message was the same and we at least removed the "Click to disable this" when disabled as it's not immediately clear why you can't click it. |
a66d3bb
to
6d174c3
Compare
I think the tooltip is a great place to mention what pressing the button does, because it isn’t really explained anywhere else what it does. |
@@ -344,7 +344,9 @@ void SceneTreeEditor::_add_nodes(Node *p_node, TreeItem *p_parent) { | |||
} | |||
|
|||
if (p_node->is_unique_name_in_owner()) { | |||
item->add_button(0, get_editor_theme_icon(SNAME("SceneUniqueName")), BUTTON_UNIQUE, p_node->get_owner() != EditorNode::get_singleton()->get_edited_scene(), vformat(TTR("This node can be accessed from within anywhere in the scene by preceding it with the '%s' prefix in a node path.\nClick to disable this."), UNIQUE_NODE_PREFIX)); | |||
bool is_enabled = p_node->get_owner() == EditorNode::get_singleton()->get_edited_scene(); | |||
String button_text = vformat(TTR("This node can be accessed from anywhere within the scene it belongs to by using the '%s' prefix in the node path%s."), UNIQUE_NODE_PREFIX, is_enabled ? "\nClick to disable this." : ""); |
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.
String button_text = vformat(TTR("This node can be accessed from anywhere within the scene it belongs to by using the '%s' prefix in the node path%s."), UNIQUE_NODE_PREFIX, is_enabled ? "\nClick to disable this." : ""); | |
String button_text = vformat(TTR("This node can be accessed from anywhere within the scene it belongs to by using the '%s' prefix in the node path.%s"), UNIQUE_NODE_PREFIX, is_enabled ? ("\n" + TTR("Click to disable this.")) : ""); |
The additional text needs to be translated, and the period should still be at the end of the first sentence
Enabled
Disabled