13 lines
290 B
GDScript
13 lines
290 B
GDScript
extends RichTextLabel
|
|
|
|
@export var key := ""
|
|
@export var alignment := "center"
|
|
|
|
var _data
|
|
|
|
func _ready() -> void:
|
|
if get_tree().root.has_node("Data"):
|
|
_data = get_tree().root.get_node("Data")
|
|
|
|
if _data.data.has("metadata"):
|
|
text = "[%s]%s" % [alignment, _data.data.metadata[key]]
|