private void Initialize()
        {
            gameObject.name = VIEW_OBJECT_NAME;

            closeButton.onClick.AddListener(() => { OnCancelClick?.Invoke(); });
            cancelButton.onClick.AddListener(() => { OnCancelClick?.Invoke(); });
            continueButton.onClick.AddListener(() => { OnContinueClick?.Invoke(); });
        }
 public OKCancelInfo(string text, string title = null, OnOKClick funcOKClicked = null, OnCancelClick funcCancelClicked = null, float fCountDown = GlobeVar.INVALID_ID, PASSWORD password = PASSWORD.INVALID, int nCountDownDicID = GlobeVar.INVALID_ID)
 {
     _text            = text;
     _title           = title;
     _delOkClick      = funcOKClicked;
     _delCancelClick  = funcCancelClicked;
     _fCountDown      = fCountDown;
     _nCountDownDicID = nCountDownDicID;
     _password        = password;
 }
 public CostBoxInfo(string text, string textSupplement = null, string title = null, string costDesc = null, string costIcon = null, string costCount = null, OnOKClick funcOKClicked = null, OnCancelClick funcCancelClicked = null)
 {
     _text           = text;
     _textSupplement = textSupplement;
     _title          = title;
     _delOkClick     = funcOKClicked;
     _delCancelClick = funcCancelClicked;
     _costDesc       = costDesc;
     _costIcon       = costIcon;
     _costCount      = costCount;
 }
 void CleanData()
 {
     deleOK         = null;
     deleCancel     = null;
     delWaitTimeOut = null;
     m_waitTimer    = 0;
     m_delayTimer   = 0;
     m_Type         = -1;
     m_ePassword    = PASSWORD.INVALID;
     CountDown      = 0;
     ShowBox();
 }
Exemple #5
0
    public void Init()
    {
        confirmButton.onClick.AddListener(() =>
        {
            OnConfirmClick?.Invoke();
        });

        cancelButton.onClick.AddListener(() =>
        {
            OnCancelClick?.Invoke();
        });

        resetButton.onClick.AddListener(() =>
        {
            OnResetClick?.Invoke();
        });
    }
    // 倒计时专用吧
    public static void OpenOKCancelCountDownBox(string text, string title = null, OnOKClick funcOKClicked = null, OnCancelClick funcCancelClicked = null, int nCountDown = GlobeVar.INVALID_ID, int nCountDownDicID = GlobeVar.INVALID_ID)
    {
        OKCancelInfo curInfo = new OKCancelInfo(text, title, funcOKClicked, funcCancelClicked, nCountDown, PASSWORD.INVALID, nCountDownDicID);

        UIManager.ShowUI(UIInfo.MessageBox, OnOpenOkCancelBox, curInfo);
    }
 public static void OpenOKCancelBox(int textDicID, int titleDicID = -1, OnOKClick funcOKClicked = null, OnCancelClick funcCancelClicked = null, PASSWORD password = PASSWORD.INVALID)
 {
     MessageBoxLogic.OpenOKCancelBox(Utils.GetDicByID(textDicID), Utils.GetDicByID((int)titleDicID), funcOKClicked, funcCancelClicked, GlobeVar.INVALID_ID, password);
 }
    public static void OpenCostBox(string text, string textSupplement = null, string title = null, string costDesc = null, string costIcon = null, string costCount = null, OnOKClick funcOKClicked = null, OnCancelClick funcCancelClicked = null)
    {
        CostBoxInfo curInfo = new CostBoxInfo(text, textSupplement, title, costDesc, costIcon, costCount, funcOKClicked, funcCancelClicked);

        UIManager.ShowUI(UIInfo.MessageBox, OnOpenCostBox, curInfo);
    }