You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
50 lines
1.2 KiB
50 lines
1.2 KiB
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<TextMeshProUGUI>();
|
|
}
|
|
|
|
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();
|
|
}
|
|
|
|
}
|