Allow Resource cells to show res name when able to

This commit is contained in:
don-tnowe 2023-07-08 20:31:28 +03:00
parent e2d4c550bd
commit 0be896b40f

View File

@ -26,7 +26,11 @@ func set_value(node : Control, value):
if !value is Resource: return
node.editor_description = value.resource_path
node.get_node("Box/Label").text = "[" + value.resource_path.get_file().get_basename() + "]"
node.get_node("Box/Label").text = (
"[" + value.resource_path.get_file().get_basename() + "]"
if value.resource_name == "" else
value.resource_name
)
if value is Texture:
node.get_node("Box/Tex").visible = true
node.get_node("Box/Tex").texture = value