diff options
author | Lucas Fryzek <lucas.fryzek@fryzekconcepts.com> | 2024-09-17 22:02:33 +0100 |
---|---|---|
committer | Lucas Fryzek <lucas.fryzek@fryzekconcepts.com> | 2024-09-17 22:02:33 +0100 |
commit | 0abec8156bd944aa883d544850ee1187219ba943 (patch) | |
tree | 55e222da361d176b0ba79611704b56e2d942a831 /addons/fpc/debug.gd |
Initial commit
Diffstat (limited to 'addons/fpc/debug.gd')
-rw-r--r-- | addons/fpc/debug.gd | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/addons/fpc/debug.gd b/addons/fpc/debug.gd new file mode 100644 index 0000000..efdb7a4 --- /dev/null +++ b/addons/fpc/debug.gd @@ -0,0 +1,18 @@ +extends PanelContainer + + +func _process(delta): + if visible: + pass + +func add_property(title : String, value, order : int): # This can either be called once for a static property or called every frame for a dynamic property + var target + target = $MarginContainer/VBoxContainer.find_child(title, true, false) # I have no idea what true and false does here, the function should be more specific + if !target: + target = Label.new() # Debug lines are of type Label + $MarginContainer/VBoxContainer.add_child(target) + target.name = title + target.text = title + ": " + str(value) + elif visible: + target.text = title + ": " + str(value) + $MarginContainer/VBoxContainer.move_child(target, order) |