From f399107c5c2f4e7cb3ccdbb117ca09915cbc8c2c Mon Sep 17 00:00:00 2001 From: Page Asgardius Date: Sat, 7 Sep 2024 15:56:32 -0700 Subject: [PATCH] Tokyo Clock --- levels/ui/tophud.gd | 6 +++++- levels/ui/tophud.tscn | 6 ++++++ 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/levels/ui/tophud.gd b/levels/ui/tophud.gd index 5a9b83f..560d825 100644 --- a/levels/ui/tophud.gd +++ b/levels/ui/tophud.gd @@ -52,9 +52,11 @@ var cboss var nboss var boss var bossbg +var ctime # Called when the node enters the scene tree for the first time. func _ready(): + ctime = $CanvasLayer/Time topleft = $CanvasLayer/Topleft topleftbg = $CanvasLayer/Topleftbg topmini = $CanvasLayer/Topmini @@ -130,6 +132,8 @@ func _ready(): # Called every frame. 'delta' is the elapsed time since the previous frame. func _process(delta): + _charrefresh() + ctime.set_text(Time.get_time_string_from_system(false).erase(5, 3)) if Global.debug: chealthf.set_text(str(Global.dstats[Global.dparty[Global.dcpchar][0]][0])+"/"+str(Global.mstats[Global.dparty[Global.dcpchar][0]][0])) cstaminaf.set_text(str(Global.dstats[Global.dparty[Global.dcpchar][0]][1])+"/"+str(Global.mstats[Global.dparty[Global.dcpchar][0]][1])) @@ -163,7 +167,7 @@ func _input(event): elif Input.is_action_just_released("schar"): topleft.visible = false topleftbg.visible = false - _charrefresh() + #_charrefresh() func _charrefresh(): if topleft.visible: if Global.debug: diff --git a/levels/ui/tophud.tscn b/levels/ui/tophud.tscn index bdcaf0f..7c1be3d 100644 --- a/levels/ui/tophud.tscn +++ b/levels/ui/tophud.tscn @@ -535,3 +535,9 @@ horizontal_alignment = 2 [node name="ColorRect2" type="ColorRect" parent="CanvasLayer/Topleft/Character4"] custom_minimum_size = Vector2(12, 64) layout_mode = 2 + +[node name="Time" type="Label" parent="CanvasLayer"] +offset_right = 40.0 +offset_bottom = 23.0 +theme_override_font_sizes/font_size = 100 +text = "08:00"