Create date label

This commit is contained in:
wjsjwr 2024-11-23 19:43:22 +08:00
parent b6ef0034ac
commit 377dc37219
2 changed files with 55 additions and 4 deletions

File diff suppressed because one or more lines are too long

View File

@ -6,6 +6,9 @@ public partial class Lab : Node2D
// Called when the node enters the scene tree for the first time.
public override void _Ready()
{
var label = GetNode<Label>("TitleBar/TitleBarBodyDate/DateLabel");
label.Text = Player.Timeline.InternalDate.ToLongDateString();
Player.Timeline.OnDayChanged += d => label.Text = d.ToLongDateString();
}
// Called every frame. 'delta' is the elapsed time since the previous frame.