42 lines
919 B
C#
42 lines
919 B
C#
using TMPro;
|
|
using UnityEngine;
|
|
using UnityEngine.UI;
|
|
using XED.UI;
|
|
using Studio.Setting.Connect;
|
|
|
|
|
|
namespace XED
|
|
{
|
|
public class UI_BaseDataButton : MonoBehaviour
|
|
{
|
|
public Panel_Repository panel_Repository;
|
|
|
|
Button button;
|
|
TextMeshProUGUI buttonName;
|
|
|
|
string baseDataKey;
|
|
StudioEntityWithState<object> baseDataValue;
|
|
|
|
private void Awake()
|
|
{
|
|
button = GetComponent<Button>();
|
|
buttonName = GetComponentInChildren<TextMeshProUGUI>();
|
|
|
|
button.onClick.AddListener(OnClickButton);
|
|
}
|
|
|
|
void OnClickButton()
|
|
{
|
|
panel_Repository.ShowInformation_BaseInfo(baseDataValue);
|
|
}
|
|
|
|
public void SetButtonData(string name, StudioEntityWithState<object> data)
|
|
{
|
|
baseDataKey = name;
|
|
baseDataValue = data;
|
|
|
|
buttonName.text = name;
|
|
}
|
|
}
|
|
}
|