public static GameObject MsgBox( string prefab , string message , PopupButtonMessageDelegate okDelegate , PopupButtonMessageDelegate retryDelegate , PopupButtonMessageDelegate cancelDelegate , TPOPUP popupType) { GameObject go = GameObject.Instantiate(Resources.Load(prefab) as GameObject) as GameObject; PopUpMessage popUp = go.GetComponent <PopUpMessage>(); popUp.onOk = okDelegate; popUp.onCancel = cancelDelegate; popUp.onRetry = retryDelegate; popUp.textMesh.text = message; popUp.textMesh.maxChars = message.Length; popUp.textMesh.Commit(); popUp.popupType = popupType; popUp.InitializeButtons(); PopupVisible = true; return(go); }
public static GameObject MsgBoxRetryCancel(string prefab, string message, PopupButtonMessageDelegate retryDelegate, PopupButtonMessageDelegate cancelDelegate) { return(MsgBox(prefab, message, null, retryDelegate, cancelDelegate, TPOPUP.BTN_RETRY_CANCEL)); }
public static GameObject MsgBoxOkCancel(string prefab, string message, PopupButtonMessageDelegate okDelegate, PopupButtonMessageDelegate cancelDelegate) { return(MsgBox(prefab, message, okDelegate, null, cancelDelegate, TPOPUP.BTN_OK_CANCEL)); }
public static GameObject MsgBoxOk(string prefab, string message, PopupButtonMessageDelegate okDelegate) { return(MsgBox(prefab, message, okDelegate, null, null, TPOPUP.BTN_OK)); }