2025-02-18 10:30:11 -05:00
|
|
|
using System;
|
2025-02-17 14:46:14 -05:00
|
|
|
using System.Collections;
|
|
|
|
|
using System.Collections.Generic;
|
|
|
|
|
using Ichni.RhythmGame;
|
|
|
|
|
using TMPro;
|
2025-02-18 10:30:11 -05:00
|
|
|
using UniRx;
|
2025-02-17 14:46:14 -05:00
|
|
|
using UnityEngine;
|
2025-03-20 02:42:10 -04:00
|
|
|
using UnityEngine.Events;
|
2025-02-17 14:46:14 -05:00
|
|
|
|
|
|
|
|
namespace Ichni.Editor
|
|
|
|
|
{
|
|
|
|
|
public class DynamicUIHintText : DynamicUIElement
|
|
|
|
|
{
|
|
|
|
|
public TMP_Text text;
|
2025-07-10 23:31:25 +08:00
|
|
|
public override void Initialize(IBaseElement baseElement, string title, string parameterName)
|
|
|
|
|
{
|
|
|
|
|
base.Initialize(baseElement, title, parameterName);
|
|
|
|
|
}
|
2025-02-17 14:46:14 -05:00
|
|
|
public void SetContent(string content)
|
|
|
|
|
{
|
|
|
|
|
text.text = content;
|
|
|
|
|
}
|
2025-07-10 23:31:25 +08:00
|
|
|
|
2025-02-18 10:30:11 -05:00
|
|
|
public void SetUpdatingContent(Func<string> content)
|
|
|
|
|
{
|
|
|
|
|
Observable.EveryUpdate().Subscribe(_ => text.text = content()).AddTo(gameObject);
|
|
|
|
|
}
|
2025-03-20 02:42:10 -04:00
|
|
|
|
2025-04-14 17:49:47 -04:00
|
|
|
public override DynamicUIElement AddListenerFunction(UnityAction action)
|
2025-03-20 02:42:10 -04:00
|
|
|
{
|
|
|
|
|
throw new System.NotImplementedException();
|
|
|
|
|
}
|
2025-02-17 14:46:14 -05:00
|
|
|
}
|
|
|
|
|
}
|