static UIPopupMessageBox CreatePopupMessageBox(PopupPriority priority) { UIPopupMessageBox msg_box = RecyclableObject.Create <UIPopupMessageBox>(); msg_box.Priority = priority; return(msg_box); }
//OK public static void Alert(string str_title, string str_text, PopupPriority priority = DefaultPriority) { UIPopupMessageBox msg_box = UIPopupMessageBox.CreatePopupMessageBox(priority); msg_box.Title = str_title; msg_box.Text = str_text; msg_box.MsgBoxType = PopupMsgBoxType.Ok; UIManager.Instance.OpenPopup(msg_box); }
//OK Cancel public static void Alert(string str_title, string str_text, BtnClickCallBack ok_callback, object ok_param, BtnClickCallBack cancel_callback, object cancel_param, PopupPriority priority = DefaultPriority) { UIPopupMessageBox msg_box = UIPopupMessageBox.CreatePopupMessageBox(priority); msg_box.Title = str_title; msg_box.Text = str_text; msg_box.OkCallback = ok_callback; msg_box.OkParam = ok_param; msg_box.CancelCallback = cancel_callback; msg_box.CancelParam = cancel_param; msg_box.MsgBoxType = PopupMsgBoxType.OkCancel; UIManager.Instance.OpenPopup(msg_box); }
public void Reset() { m_priority = PopupPriority.Invalid; m_msg_box_type = PopupMsgBoxType.Ok; m_title = ""; m_text = ""; m_ok_text = null; m_ok_callback = null; m_ok_param = null; m_cancel_text = null; m_cancel_callback = null; m_cancel_param = null; m_close_callback = null; m_close_param = null; }