15 lines
363 B
C#
15 lines
363 B
C#
using Godot;
|
|
using System;
|
|
using System.Globalization;
|
|
|
|
namespace BITKit;
|
|
public partial class DateTimeNode : Label
|
|
{
|
|
[Export]
|
|
private string timeFormat;
|
|
public override void _Process(double delta)
|
|
{
|
|
Text = string.IsNullOrEmpty(timeFormat) ? DateTime.Now.ToString(CultureInfo.InvariantCulture) : DateTime.Now.ToString(timeFormat);
|
|
}
|
|
}
|