readme
This commit is contained in:
14
BITKit/Scripts/Node2D/DateTimeNode.cs
Normal file
14
BITKit/Scripts/Node2D/DateTimeNode.cs
Normal file
@@ -0,0 +1,14 @@
|
||||
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);
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user