所有Simple UI Element,以及Composite Parameter Window初步
This commit is contained in:
@@ -0,0 +1,28 @@
|
||||
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 hasTitle)
|
||||
{
|
||||
this.buttonText.text = buttonText;
|
||||
if(!hasTitle) title.gameObject.SetActive(false);
|
||||
}
|
||||
|
||||
public void ApplyFunction(UnityAction function)
|
||||
{
|
||||
button.onClick.AddListener(function);
|
||||
button.onClick.AddListener(connectedBaseElement.Refresh);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user