small racing game im working on
Diffstat (limited to 'ui/trackbutton.gd')
-rw-r--r--ui/trackbutton.gd8
1 files changed, 8 insertions, 0 deletions
diff --git a/ui/trackbutton.gd b/ui/trackbutton.gd
new file mode 100644
index 0000000..c046098
--- /dev/null
+++ b/ui/trackbutton.gd
@@ -0,0 +1,8 @@
+extends Control
+
+func init(t: float, n: String) -> void:
+ $VBoxContainer/name.text = n
+ if t < 0:
+ $VBoxContainer/time.text = "no time set"
+ else:
+ $VBoxContainer/time.text = GameTimer.format_precise(t)