diff options
| author | Anson Bridges <bridges.anson@gmail.com> | 2022-08-31 00:26:34 -0700 |
|---|---|---|
| committer | Anson Bridges <bridges.anson@gmail.com> | 2022-08-31 00:26:34 -0700 |
| commit | d3998186c9795f2a85148cd5bcfa1bd5b6226cfb (patch) | |
| tree | ba5cae524562818ee38da48dd09b0b42a733e1d8 /scripts/Console.gd | |
Initialize repo
Diffstat (limited to 'scripts/Console.gd')
| -rw-r--r-- | scripts/Console.gd | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/scripts/Console.gd b/scripts/Console.gd new file mode 100644 index 0000000..ac73525 --- /dev/null +++ b/scripts/Console.gd @@ -0,0 +1,14 @@ +extends ScrollContainer + +# Called when the node enters the scene tree for the first time. +func _ready(): + pass + +func add_line(text): + var lbl = Label.new() + lbl.autowrap = true + lbl.text = text + text = "" + $ConsoleLines.add_child(lbl) + yield(get_tree().create_timer(0.05), "timeout") + ensure_control_visible(lbl) |
