Show symlink target in the resource tooltip.

This commit is contained in:
Pāvels Nadtočajevs 2025-08-11 16:55:57 +03:00
parent a3b42d85d2
commit 90da041683
No known key found for this signature in database
GPG key ID: 8413210218EF35D2

View file

@ -81,6 +81,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;
}