online multiplayer chess game (note server currently down)
Diffstat (limited to 'ui/Status.gd')
| -rw-r--r-- | ui/Status.gd | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/ui/Status.gd b/ui/Status.gd index 99c6697..1cf2eb7 100644 --- a/ui/Status.gd +++ b/ui/Status.gd @@ -3,7 +3,12 @@ class_name StatusLabel func set_text(newtext: String, time := 7) -> void: - text = newtext + __set_text(newtext) if time != 0: yield(get_tree().create_timer(time), "timeout") - text = "" + __set_text("") + + +func __set_text(_text: String = ""): + text = _text + visible = text != "" |