using TMPro; using UnityEngine; using UnityEngine.UI; namespace UnityTest.ZXL { //强提示 public class StrongTipsUI : UI { public TextMeshProUGUI titleText; public TextMeshProUGUI contentText; public Button btnLeft; public Button btnRight; public void SetContent(string title, string content) { titleText.text = title; contentText.text = content; } public void SetContent(string title, string content, int btnCount) { titleText.text = title; contentText.text = content; btnLeft.gameObject.SetActive(true); btnRight.gameObject.SetActive(true); if (btnCount == 0) { btnLeft.gameObject.SetActive(false); btnRight.gameObject.SetActive(false); } else if (btnCount == 1) { btnRight.gameObject.SetActive(false); } } } }