1 extends MarginContainer
5 var num_format = "%4.2f"
6 var object # The object being tracked.
7 var property # The property to display (NodePath).
8 var label_ref # A reference to the Label.
9 var display # Display option (rounded, etc.)
11 func _init(_object, _property, _label, _display):
18 # Sets the label's text.
19 var s = object.name + "/" + property + " : "
20 var p = object.get_indexed(property)
25 s += num_format % p.length()
30 TYPE_VECTOR2, TYPE_VECTOR3:
34 var props = [] # An array of the tracked properties.
35 var _labelSettings: LabelSettings = null
38 func _ready() -> void:
39 _labelSettings = LabelSettings.new()
40 _labelSettings.font_size = 25
43 func _process(_delta):
50 func add_property(object, property, display):
51 var label = Label.new()
52 label.label_settings = _labelSettings
53 $VBoxContainer.add_child(label)
54 props.append(Property.new(object, property, label, display))
57 func remove_property(object, property):
59 if prop.object == object and prop.property == property: