2025-02-13 02:04:41 -05:00
|
|
|
using System.Collections;
|
|
|
|
|
using System.Collections.Generic;
|
|
|
|
|
using Ichni.RhythmGame;
|
|
|
|
|
using TMPro;
|
|
|
|
|
using UnityEngine;
|
|
|
|
|
using UnityEngine.Events;
|
|
|
|
|
using UnityEngine.UI;
|
|
|
|
|
|
|
|
|
|
namespace Ichni.Editor
|
|
|
|
|
{
|
|
|
|
|
public class DynamicUIButton : DynamicUIElement
|
|
|
|
|
{
|
|
|
|
|
public Button button;
|
|
|
|
|
public TMP_Text buttonText;
|
|
|
|
|
|
2025-04-14 17:49:47 -04:00
|
|
|
public void SetText(string buttonText)
|
2025-02-13 02:04:41 -05:00
|
|
|
{
|
|
|
|
|
this.buttonText.text = buttonText;
|
|
|
|
|
}
|
2025-03-02 02:18:28 -05:00
|
|
|
|
2025-02-13 02:04:41 -05:00
|
|
|
public void ApplyFunction(UnityAction function)
|
|
|
|
|
{
|
|
|
|
|
button.onClick.AddListener(function);
|
2025-03-02 02:18:28 -05:00
|
|
|
if (connectedBaseElement != null)
|
|
|
|
|
{
|
|
|
|
|
button.onClick.AddListener(connectedBaseElement.Refresh);
|
|
|
|
|
}
|
2025-02-13 02:04:41 -05:00
|
|
|
}
|
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-13 02:04:41 -05:00
|
|
|
}
|
|
|
|
|
}
|