Exemplo n.º 1
0
        static UIPopupMessageBox CreatePopupMessageBox(PopupPriority priority)
        {
            UIPopupMessageBox msg_box = RecyclableObject.Create <UIPopupMessageBox>();

            msg_box.Priority = priority;
            return(msg_box);
        }
Exemplo n.º 2
0
        //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);
        }
Exemplo n.º 3
0
        public static void Alert(string str_title, string str_text, BtnClickCallBack ok_callback, object ok_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.MsgBoxType = PopupMsgBoxType.Ok;

            UIManager.Instance.OpenPopup(msg_box);
        }
Exemplo n.º 4
0
        public static void OnCloseClicked(object param)
        {
            Debug.Log("UIPopupMessageBox OnCloseClicked");

            UIPopupMessageBox msg_box = param as UIPopupMessageBox;

            if (msg_box != null)
            {
                if (msg_box.CloseCallback != null)
                {
                    msg_box.CloseCallback(msg_box.CloseParam);
                    msg_box.CloseCallback = null;
                }
                UIManager.Instance.ClosePopup(msg_box);
            }
        }
Exemplo n.º 5
0
 static void RecyclePopupMessageBox(UIPopupMessageBox popup)
 {
     RecyclableObject.Recycle(popup);
     popup = null;
 }