2025-03-10 16:42:23 +09:00
|
|
|
using System.Collections;
|
|
|
|
|
using System.Collections.Generic;
|
|
|
|
|
using UnityEngine;
|
|
|
|
|
using WI;
|
|
|
|
|
using TMPro;
|
|
|
|
|
|
|
|
|
|
public class UI_DateTime : UIBase
|
|
|
|
|
{
|
|
|
|
|
public TMP_Text dateTime;
|
|
|
|
|
|
|
|
|
|
public override void AfterAwake()
|
|
|
|
|
{
|
|
|
|
|
dateTime = GetComponent<TMP_Text>();
|
|
|
|
|
}
|
|
|
|
|
public void SetDateTime(string time)
|
|
|
|
|
{
|
2025-04-17 09:31:53 +09:00
|
|
|
dateTime.SetText(SplitString(time));
|
|
|
|
|
}
|
|
|
|
|
private string SplitString(string value)
|
|
|
|
|
{
|
|
|
|
|
var splitText_1 = value.Substring(0, value.IndexOf("T") + 1);
|
|
|
|
|
var splitText_2 = value.Substring(value.IndexOf("T") + 1).Trim();
|
|
|
|
|
|
|
|
|
|
var lineBreakText = splitText_1 + "\n" + splitText_2;
|
|
|
|
|
return lineBreakText;
|
2025-03-10 16:42:23 +09:00
|
|
|
}
|
|
|
|
|
}
|