mirror of
https://github.com/godotengine/godot.git
synced 2025-12-07 22:00:10 +00:00
Merge pull request #109525 from bruvzg/res_link_target
Show symlink target in the resource tooltip.
This commit is contained in:
commit
5f6229022f
1 changed files with 6 additions and 0 deletions
|
|
@ -85,6 +85,12 @@ VBoxContainer *EditorResourceTooltipPlugin::make_default_tooltip(const String &p
|
|||
Label *label = memnew(Label(vformat(TTR("Type: %s"), type)));
|
||||
vb->add_child(label);
|
||||
}
|
||||
|
||||
Ref<DirAccess> da = DirAccess::create(DirAccess::ACCESS_RESOURCES);
|
||||
if (da->is_link(p_resource_path)) {
|
||||
Label *link = memnew(Label(vformat(TTR("Link to: %s"), da->read_link(p_resource_path))));
|
||||
vb->add_child(link);
|
||||
}
|
||||
return vb;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue