YanCheng_Metrology/Assets/Scripts/Project/UI/UI_Panel/UI_SessionPanel.cs

43 lines
1.0 KiB
C#
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

using TMPro;
using UnityEngine;
using UnityEngine.UI;
public class UI_SessionPanel : BasePanel
{
private void Start()
{
Debug.Log("1111111");
}
/// <summary>
/// 初始化
/// </summary>
public void Init(string content)
{
GetControl<TextMeshProUGUI>("Text_DialogBox").text = content;//在开始时给content赋值
}
//public override void ShowMe()
//{
//}
//public override void HideMe()
//{
//}
/// <summary>
/// 按钮点击
/// </summary>
/// <param name="btnName"></param>
protected override void OnClick(string btnName)
{
switch (btnName)
{
case "ContinueBtn":
Debug.Log("点击继续按钮");
GetControl<TextMeshProUGUI>("Text_DialogBox").text = "你好我是xx供电公司员工这是我的工作证。现在我们要对贵户高压电能计量装置进行安装";
this.gameObject.SetActive(false);
break;
}
}
}