2025-05-22 16:12:56 +09:00
|
|
|
using TMPro;
|
|
|
|
|
using UnityEngine;
|
|
|
|
|
using UnityEngine.UI;
|
2025-05-23 19:00:09 +09:00
|
|
|
using Studio.UI;
|
2025-05-22 18:29:09 +09:00
|
|
|
using Studio.Setting.Connect;
|
2025-05-23 12:33:04 +09:00
|
|
|
using XRLib.UI;
|
2025-05-22 18:29:09 +09:00
|
|
|
|
2025-05-22 16:12:56 +09:00
|
|
|
|
2025-05-23 19:00:09 +09:00
|
|
|
namespace Studio
|
2025-05-22 16:12:56 +09:00
|
|
|
{
|
2025-05-23 12:33:04 +09:00
|
|
|
public class UI_BaseDataButton : UIBase
|
2025-05-22 16:12:56 +09:00
|
|
|
{
|
2025-05-23 19:00:09 +09:00
|
|
|
public Panel_DataRepository panel_Repository;
|
2025-05-22 16:12:56 +09:00
|
|
|
|
|
|
|
|
Button button;
|
|
|
|
|
TextMeshProUGUI buttonName;
|
|
|
|
|
|
2025-05-22 18:29:09 +09:00
|
|
|
string baseDataKey;
|
2025-05-23 13:59:45 +09:00
|
|
|
StudioEntityWithState<object> dataValue;
|
2025-05-22 18:29:09 +09:00
|
|
|
|
2025-05-22 16:12:56 +09:00
|
|
|
private void Awake()
|
|
|
|
|
{
|
|
|
|
|
button = GetComponent<Button>();
|
|
|
|
|
buttonName = GetComponentInChildren<TextMeshProUGUI>();
|
|
|
|
|
|
|
|
|
|
button.onClick.AddListener(OnClickButton);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void OnClickButton()
|
|
|
|
|
{
|
2025-05-23 13:59:45 +09:00
|
|
|
panel_Repository.ShowInformation_APIData(dataValue);
|
2025-05-22 16:12:56 +09:00
|
|
|
}
|
|
|
|
|
|
2025-05-22 18:29:09 +09:00
|
|
|
public void SetButtonData(string name, StudioEntityWithState<object> data)
|
2025-05-22 16:12:56 +09:00
|
|
|
{
|
2025-05-22 18:29:09 +09:00
|
|
|
baseDataKey = name;
|
2025-05-23 13:59:45 +09:00
|
|
|
dataValue = data;
|
2025-05-22 16:12:56 +09:00
|
|
|
|
2025-05-22 18:29:09 +09:00
|
|
|
buttonName.text = name;
|
2025-05-22 16:12:56 +09:00
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|