Merge pull request #70880 from KoBeWi/remotely_useful
Improve remote tree node tooltips
This commit is contained in:
commit
ac0c757e46
|
@ -158,7 +158,11 @@ void EditorDebuggerTree::update_scene_tree(const SceneDebuggerTree *p_tree, int
|
||||||
const SceneDebuggerTree::RemoteNode &node = p_tree->nodes[i];
|
const SceneDebuggerTree::RemoteNode &node = p_tree->nodes[i];
|
||||||
TreeItem *item = create_item(parent);
|
TreeItem *item = create_item(parent);
|
||||||
item->set_text(0, node.name);
|
item->set_text(0, node.name);
|
||||||
item->set_tooltip_text(0, TTR("Type:") + " " + node.type_name);
|
if (node.scene_file_path.is_empty()) {
|
||||||
|
item->set_tooltip_text(0, node.name + "\n" + TTR("Type:") + " " + node.type_name);
|
||||||
|
} else {
|
||||||
|
item->set_tooltip_text(0, node.name + "\n" + TTR("Instance:") + " " + node.scene_file_path + "\n" + TTR("Type:") + " " + node.type_name);
|
||||||
|
}
|
||||||
Ref<Texture2D> icon = EditorNode::get_singleton()->get_class_icon(node.type_name, "");
|
Ref<Texture2D> icon = EditorNode::get_singleton()->get_class_icon(node.type_name, "");
|
||||||
if (icon.is_valid()) {
|
if (icon.is_valid()) {
|
||||||
item->set_icon(0, icon);
|
item->set_icon(0, icon);
|
||||||
|
|
Loading…
Reference in New Issue