mirror of
https://github.com/Relintai/godot-resources-as-sheets-plugin.git
synced 2025-04-08 17:41:50 +02:00
If resource name set, show it instead of path
This commit is contained in:
parent
0be896b40f
commit
a7b7bce4e4
@ -26,11 +26,12 @@ 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() + "]"
|
||||
if value.resource_name == "" else
|
||||
value.resource_name
|
||||
)
|
||||
if value.resource_name == "":
|
||||
node.get_node("Box/Label").text = "[" + value.resource_path.get_file().get_basename() + "]"
|
||||
|
||||
else:
|
||||
node.get_node("Box/Label").text = value.resource_name
|
||||
|
||||
if value is Texture:
|
||||
node.get_node("Box/Tex").visible = true
|
||||
node.get_node("Box/Tex").texture = value
|
||||
|
Loading…
Reference in New Issue
Block a user