Improve tooltips for grouping/ungrouping nodes
(cherry picked from commit 1ff9a09e2c
)
This commit is contained in:
parent
3976bddaf4
commit
543e74a988
3 changed files with 6 additions and 6 deletions
|
@ -6096,13 +6096,13 @@ CanvasItemEditor::CanvasItemEditor(EditorNode *p_editor) {
|
||||||
group_button = memnew(ToolButton);
|
group_button = memnew(ToolButton);
|
||||||
main_menu_hbox->add_child(group_button);
|
main_menu_hbox->add_child(group_button);
|
||||||
group_button->connect("pressed", this, "_popup_callback", varray(GROUP_SELECTED));
|
group_button->connect("pressed", this, "_popup_callback", varray(GROUP_SELECTED));
|
||||||
group_button->set_tooltip(TTR("Makes sure the object's children are not selectable."));
|
group_button->set_tooltip(TTR("Make selected node's children not selectable."));
|
||||||
group_button->set_shortcut(ED_SHORTCUT("editor/group_selected_nodes", TTR("Group Selected Node(s)"), KEY_MASK_CMD | KEY_G));
|
group_button->set_shortcut(ED_SHORTCUT("editor/group_selected_nodes", TTR("Group Selected Node(s)"), KEY_MASK_CMD | KEY_G));
|
||||||
|
|
||||||
ungroup_button = memnew(ToolButton);
|
ungroup_button = memnew(ToolButton);
|
||||||
main_menu_hbox->add_child(ungroup_button);
|
main_menu_hbox->add_child(ungroup_button);
|
||||||
ungroup_button->connect("pressed", this, "_popup_callback", varray(UNGROUP_SELECTED));
|
ungroup_button->connect("pressed", this, "_popup_callback", varray(UNGROUP_SELECTED));
|
||||||
ungroup_button->set_tooltip(TTR("Restores the object's children's ability to be selected."));
|
ungroup_button->set_tooltip(TTR("Make selected node's children selectable."));
|
||||||
ungroup_button->set_shortcut(ED_SHORTCUT("editor/ungroup_selected_nodes", TTR("Ungroup Selected Node(s)"), KEY_MASK_CMD | KEY_MASK_SHIFT | KEY_G));
|
ungroup_button->set_shortcut(ED_SHORTCUT("editor/ungroup_selected_nodes", TTR("Ungroup Selected Node(s)"), KEY_MASK_CMD | KEY_MASK_SHIFT | KEY_G));
|
||||||
|
|
||||||
main_menu_hbox->add_child(memnew(VSeparator));
|
main_menu_hbox->add_child(memnew(VSeparator));
|
||||||
|
|
|
@ -6672,14 +6672,14 @@ SpatialEditor::SpatialEditor(EditorNode *p_editor) {
|
||||||
main_menu_hbox->add_child(tool_button[TOOL_GROUP_SELECTED]);
|
main_menu_hbox->add_child(tool_button[TOOL_GROUP_SELECTED]);
|
||||||
button_binds.write[0] = MENU_GROUP_SELECTED;
|
button_binds.write[0] = MENU_GROUP_SELECTED;
|
||||||
tool_button[TOOL_GROUP_SELECTED]->connect("pressed", this, "_menu_item_pressed", button_binds);
|
tool_button[TOOL_GROUP_SELECTED]->connect("pressed", this, "_menu_item_pressed", button_binds);
|
||||||
tool_button[TOOL_GROUP_SELECTED]->set_tooltip(TTR("Makes sure the object's children are not selectable."));
|
tool_button[TOOL_GROUP_SELECTED]->set_tooltip(TTR("Make selected node's children not selectable."));
|
||||||
tool_button[TOOL_GROUP_SELECTED]->set_shortcut(ED_SHORTCUT("editor/group_selected_nodes", TTR("Group Selected Node(s)"), KEY_MASK_CMD | KEY_G));
|
tool_button[TOOL_GROUP_SELECTED]->set_shortcut(ED_SHORTCUT("editor/group_selected_nodes", TTR("Group Selected Node(s)"), KEY_MASK_CMD | KEY_G));
|
||||||
|
|
||||||
tool_button[TOOL_UNGROUP_SELECTED] = memnew(ToolButton);
|
tool_button[TOOL_UNGROUP_SELECTED] = memnew(ToolButton);
|
||||||
main_menu_hbox->add_child(tool_button[TOOL_UNGROUP_SELECTED]);
|
main_menu_hbox->add_child(tool_button[TOOL_UNGROUP_SELECTED]);
|
||||||
button_binds.write[0] = MENU_UNGROUP_SELECTED;
|
button_binds.write[0] = MENU_UNGROUP_SELECTED;
|
||||||
tool_button[TOOL_UNGROUP_SELECTED]->connect("pressed", this, "_menu_item_pressed", button_binds);
|
tool_button[TOOL_UNGROUP_SELECTED]->connect("pressed", this, "_menu_item_pressed", button_binds);
|
||||||
tool_button[TOOL_UNGROUP_SELECTED]->set_tooltip(TTR("Restores the object's children's ability to be selected."));
|
tool_button[TOOL_UNGROUP_SELECTED]->set_tooltip(TTR("Make selected node's children selectable."));
|
||||||
tool_button[TOOL_UNGROUP_SELECTED]->set_shortcut(ED_SHORTCUT("editor/ungroup_selected_nodes", TTR("Ungroup Selected Node(s)"), KEY_MASK_CMD | KEY_MASK_SHIFT | KEY_G));
|
tool_button[TOOL_UNGROUP_SELECTED]->set_shortcut(ED_SHORTCUT("editor/ungroup_selected_nodes", TTR("Ungroup Selected Node(s)"), KEY_MASK_CMD | KEY_MASK_SHIFT | KEY_G));
|
||||||
|
|
||||||
main_menu_hbox->add_child(memnew(VSeparator));
|
main_menu_hbox->add_child(memnew(VSeparator));
|
||||||
|
|
|
@ -357,7 +357,7 @@ bool SceneTreeEditor::_add_nodes(Node *p_node, TreeItem *p_parent, bool p_scroll
|
||||||
|
|
||||||
bool is_grouped = p_node->has_meta("_edit_group_");
|
bool is_grouped = p_node->has_meta("_edit_group_");
|
||||||
if (is_grouped) {
|
if (is_grouped) {
|
||||||
item->add_button(0, get_icon("Group", "EditorIcons"), BUTTON_GROUP, false, TTR("Children are not selectable.\nClick to make selectable."));
|
item->add_button(0, get_icon("Group", "EditorIcons"), BUTTON_GROUP, false, TTR("Children are not selectable.\nClick to make them selectable."));
|
||||||
}
|
}
|
||||||
|
|
||||||
bool v = p_node->call("is_visible");
|
bool v = p_node->call("is_visible");
|
||||||
|
@ -391,7 +391,7 @@ bool SceneTreeEditor::_add_nodes(Node *p_node, TreeItem *p_parent, bool p_scroll
|
||||||
|
|
||||||
bool is_grouped = p_node->has_meta("_edit_group_");
|
bool is_grouped = p_node->has_meta("_edit_group_");
|
||||||
if (is_grouped) {
|
if (is_grouped) {
|
||||||
item->add_button(0, get_icon("Group", "EditorIcons"), BUTTON_GROUP, false, TTR("Children are not selectable.\nClick to make selectable."));
|
item->add_button(0, get_icon("Group", "EditorIcons"), BUTTON_GROUP, false, TTR("Children are not selectable.\nClick to make them selectable."));
|
||||||
}
|
}
|
||||||
|
|
||||||
bool v = p_node->call("is_visible");
|
bool v = p_node->call("is_visible");
|
||||||
|
|
Loading…
Reference in a new issue