46 lines
1.1 KiB
C#
46 lines
1.1 KiB
C#
using Studio.Setting.Connect;
|
|
using System;
|
|
using System.Collections.Generic;
|
|
using TMPro;
|
|
using UnityEngine;
|
|
using UnityEngine.UI;
|
|
using Studio.UI;
|
|
using XRLib.UI;
|
|
|
|
namespace Studio
|
|
{
|
|
public class UI_MQTTDataButton : UIBase
|
|
{
|
|
public Panel_DataRepository panel_Repository;
|
|
|
|
Button button;
|
|
TextMeshProUGUI buttonName;
|
|
|
|
string baseDataKey;
|
|
Dictionary<string, Dictionary<string, string>> dataValue;
|
|
TimeSpan elapsedTime;
|
|
|
|
private void Awake()
|
|
{
|
|
button = GetComponent<Button>();
|
|
buttonName = GetComponentInChildren<TextMeshProUGUI>();
|
|
|
|
button.onClick.AddListener(OnClickButton);
|
|
}
|
|
|
|
void OnClickButton()
|
|
{
|
|
panel_Repository.ShowInformation_MQTTData(dataValue, elapsedTime);
|
|
}
|
|
|
|
public void SetButtonData(string name, Dictionary<string, Dictionary<string, string>> data, TimeSpan elapsedTime)
|
|
{
|
|
baseDataKey = name;
|
|
dataValue = data;
|
|
this.elapsedTime = elapsedTime;
|
|
|
|
buttonName.text = name;
|
|
}
|
|
}
|
|
}
|