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; public void SetText(string buttonText, bool showTitle) { this.buttonText.text = buttonText; if(!showTitle) title.gameObject.SetActive(false); } public void ApplyFunction(UnityAction function) { button.onClick.AddListener(function); if (connectedBaseElement != null) { button.onClick.AddListener(connectedBaseElement.Refresh); } } public override void AddListenerFunction(UnityAction action) { throw new System.NotImplementedException(); } } }