Example #1
0
    public void TruelyInfo(string text, string okText = "OK", string cancelText = "CANCEL", float countDownTime = -1,
                           ButtonBgType okBgType      = ButtonBgType.Blue, ButtonBgType cancelBgType = ButtonBgType.Brown, Action callback = null)
    {
        if (okText.Equals("OK"))
        {
            okText = LanguageData.GetContent(25561);
        }
        if (cancelText.Equals("CANCEL"))
        {
            cancelText = LanguageData.GetContent(25562);
        }

        m_goOKCancelBox.SetBoxText(text);
        m_goOKCancelBox.SetOKBtnText(okText);
        m_goOKCancelBox.SetCancelBtnText(cancelText);
        SetButtonBg(m_goOKCancelBox.m_spOKBgUp, m_goOKCancelBox.m_spOKBgDown, okBgType);
        SetButtonBg(m_goOKCancelBox.m_spCancelBgUp, m_goOKCancelBox.m_spCancelBgDown, cancelBgType);
        m_goOKCancelBox.SetCountDown(countDownTime);

        m_goOKCancelBox.ShowAsOK();

        m_goOKCancelBox.gameObject.SetActive(true);

        m_goOKCancelBox.SetCallback((rst) =>
        {
            ConfirmHide();
            if (callback != null)
            {
                callback();
            }
        });
        //m_goModelController.gameObject.SetActive(true);

        //Debug.Log("TruleyInfo");
    }
Example #2
0
 public void ShowMsgBox(string okText, string cancelText, string content, Action <bool> onClick)
 {
     //Debug.LogError("ShowMsgBox");
     m_msgBox.gameObject.SetActive(true);
     m_msgBox.SetBoxText(content);
     m_msgBox.SetOKBtnText(okText);
     m_msgBox.SetCancelBtnText(cancelText);
     m_msgBox.SetCallback(onClick);
     ishide = false;
 }