using TMPro; public class IVPp2Button : IVPp1Button { protected TextMeshProUGUI txtBtnNo; protected System.Action actionBtnNo; public override void Init() { base.Init(); txtBtnNo = transform.Find("btnNo").Find("txt").GetComponent(); } public void Open(string strmsg, System.Action actionyes = null, System.Action actionno = null, string strtitle = null, string stryes = null, string strno = null, int igroup = -1) { if (string.IsNullOrEmpty(stryes)) stryes = LocalizationText.GetText(Global.STR_YES); if (string.IsNullOrEmpty(strno)) strno = LocalizationText.GetText(Global.STR_NO); txtBtnNo.text = strno; actionBtnNo = actionno; Open(strmsg, actionyes, strtitle, stryes, true, 0f, igroup); } public override void CloseGroup(int igroup) { if (iGroup != igroup) return; BtnNoPressed(); } public void BtnNoPressed() { SoundMgr.PlaySfx(SoundName.BtnPress); CancelInvoke("Close"); if (bClose) { GameUIMgr.SOnClosePopup(); gameObject.SetActive(false); } if (actionBtnNo != null) actionBtnNo.Invoke(); } }