Ejemplo n.º 1
0
        //OK Cancel
        public static void Alert(string str_title, string str_text, string ok_text, BtnClickCallBack ok_callback, object ok_param,
                                 string cancel_text, BtnClickCallBack cancel_callback, object cancel_param)
        {
            ClearCallback();

            UIMessageBox msg_box = UIManager.Instance.GetUIMessageBox();

            msg_box.SetTitleText(str_title);
            msg_box.SetText(str_text);

            msg_box.SetOkButtonText(ok_text);
            msg_box.m_btn_ok.localPosition = m_ok_original_pos;
            msg_box.SetCancelButtonText(cancel_text);
            msg_box.m_btn_cancel.localPosition = m_cancel_original_pos;
            UIHelper.SetActive(msg_box.m_btn_ok.gameObject, true);
            UIHelper.SetActive(msg_box.m_btn_cancel.gameObject, true);
            UIHelper.SetActive(msg_box.m_btn_close.gameObject, false);

            m_ok_callback     = ok_callback;
            m_ok_param        = ok_param;
            m_cancel_callback = cancel_callback;
            m_cancel_param    = cancel_param;

            SetShow(true);
        }
Ejemplo n.º 2
0
        public static void ClearCallback()
        {
            m_ok_callback     = null;
            m_cancel_callback = null;
            m_close_callback  = null;

            m_ok_param     = null;
            m_cancel_param = null;
            m_close_param  = null;
        }
Ejemplo 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);
        }
Ejemplo n.º 4
0
        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;
        }