71 lines
1.4 KiB
C#
71 lines
1.4 KiB
C#
// ***********************************************************************
|
|
// Assembly : Game
|
|
// Author : Kimch
|
|
// Created : 2020-09-08
|
|
// Description :
|
|
// Last Modified By :
|
|
// Last Modified On :
|
|
// ***********************************************************************
|
|
// <copyright file= "TipsBox.View" company="Kimch"></copyright>
|
|
// <summary></summary>
|
|
// ***********************************************************************
|
|
namespace G.UI
|
|
{
|
|
using TMPro;
|
|
using UnityEngine;
|
|
using UnityEngine.UI;
|
|
|
|
/// <summary>
|
|
///
|
|
/// </summary>
|
|
partial class TipsBox
|
|
{
|
|
#region Field
|
|
|
|
#pragma warning disable CS0649 // 从未对字段赋值,字段将一直保持其默认值 null
|
|
[KUIFlag]
|
|
RectTransform _goTips;
|
|
[KUIFlag]
|
|
TextMeshProUGUI _tmpTips;
|
|
#pragma warning restore CS0649 // 从未对字段赋值,字段将一直保持其默认值 null
|
|
|
|
#endregion
|
|
|
|
#region Method
|
|
|
|
/// <summary>
|
|
///
|
|
/// </summary>
|
|
public void InitView()
|
|
{
|
|
SetViewData();
|
|
gameObject.GetComponent<Button>().onClick.AddListener(this.OnCloseBtnClick);
|
|
}
|
|
|
|
/// <summary>
|
|
///
|
|
/// </summary>
|
|
public void RefreshView()
|
|
{
|
|
if (this.data is string str)
|
|
{
|
|
_tmpTips.text = str;
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
///
|
|
/// </summary>
|
|
public void UpdateView()
|
|
{
|
|
}
|
|
|
|
private void OnCloseBtnClick()
|
|
{
|
|
CloseWindow(this);
|
|
}
|
|
|
|
#endregion
|
|
}
|
|
}
|