Frame/Assets/Scripts/UI/View/ScrollRect/ScrollRefreshInfo.cs

24 lines
547 B
C#

using TMPro;
using UnityEngine;
public class ScrollRefreshInfo : MonoBehaviour
{
private string oldStr;
[SerializeField] private GameObject imgRefresh;
[SerializeField] private TMP_Text txtContent;
public void SetContent(string str)
{
if (this.oldStr == str) return;
this.txtContent.text = str;
this.oldStr = str;
Debug.Log(str);
}
public void ShowAndHideSelf(bool isShow)
{
if (this.gameObject.activeSelf != isShow)
this.gameObject.SetActive(isShow);
}
}