少年修仙传客户端代码仓库
hch
2020-10-19 a62a334be58606c19890b4a9d78ee492b1df62b4
Merge branch 'master' of http://mobile.173on.com:10010/r/snxxz_scripts
3个文件已修改
36 ■■■■■ 已修改文件
System/SystemSetting/SystemSetWin.cs 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/Tip/ConfirmCancel.cs 20 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/Tip/PopConfirmWin.cs 14 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/SystemSetting/SystemSetWin.cs
@@ -208,7 +208,7 @@
            m_LDListView.SetActive(false);
            Language.Id = lgId;
            m_LDLabel.text = label;
            ConfirmCancel.ShowPopConfirm(Language.Get("Mail101"), Language.Get("language_tip_info"), (yes) =>
            ConfirmCancel.ShowPopConfirm(Language.Get("Mail101"), Language.Get("language_tip_info"), Language.Get("language_tip_btn2"), Language.Get("language_tip_btn1"), (yes) =>
            {
                Debug.LogFormat("退出!:{0}", yes);
                if (yes)
System/Tip/ConfirmCancel.cs
@@ -14,6 +14,7 @@
        public static string popConfirmInfo { get; private set; }
        public static bool IsSingleConfirm { get; private set; }
        public static string OKName { get; private set; }
        public static string CancelName { get; private set; }
        public static void ShowPopConfirm(string title, string info, Action<bool> func)
        {
            popConfirmTitle = title;
@@ -21,6 +22,8 @@
            OnPopConfirmClickEvent = func;
            OnPopSingleConfirmEvent = null;
            IsSingleConfirm = false;
            OKName = null;
            CancelName = null;
            if (!WindowCenter.Instance.IsOpen<PopConfirmWin>())
            {
                WindowCenter.Instance.Open<PopConfirmWin>();
@@ -34,6 +37,23 @@
            OnPopConfirmClickEvent = null;
            OnPopSingleConfirmEvent = func;
            IsSingleConfirm = true;
            OKName = null;
            CancelName = null;
            if (!WindowCenter.Instance.IsOpen<PopConfirmWin>())
            {
                WindowCenter.Instance.Open<PopConfirmWin>();
            }
        }
        public static void ShowPopConfirm(string title, string info, string okName, string cancelName, Action<bool> func)
        {
            popConfirmTitle = title;
            popConfirmInfo = info;
            OnPopConfirmClickEvent = func;
            OnPopSingleConfirmEvent = null;
            IsSingleConfirm = false;
            OKName = okName;
            CancelName = cancelName;
            if (!WindowCenter.Instance.IsOpen<PopConfirmWin>())
            {
                WindowCenter.Instance.Open<PopConfirmWin>();
System/Tip/PopConfirmWin.cs
@@ -37,6 +37,15 @@
            popConfirmTitle.text = ConfirmCancel.popConfirmTitle;
            popConfirmInfo.text = ConfirmCancel.popConfirmInfo;
            if (string.IsNullOrEmpty(ConfirmCancel.OKName))
                (popConfirmBtn.FindComponent("Text", "Text") as Text).text = Language.Get("PopConfirmWin_OK");
            else
                (popConfirmBtn.FindComponent("Text", "Text") as Text).text = ConfirmCancel.OKName;
            if (string.IsNullOrEmpty(ConfirmCancel.CancelName))
                (popCancelBtn.FindComponent("Text", "Text") as Text).text = Language.Get("PopConfirmWin_Cancel");
            else
                (popCancelBtn.FindComponent("Text", "Text") as Text).text = ConfirmCancel.CancelName;
        }
        protected override void OnAfterOpen()
@@ -52,7 +61,7 @@
        }
        #endregion
        void OnPopConfirmOkBtn()
        {
@@ -71,7 +80,8 @@
        void OnPopConfirmCancelBtn()
        {
            CloseClick();
            if (ConfirmCancel.OnPopConfirmClickEvent != null) {
            if (ConfirmCancel.OnPopConfirmClickEvent != null)
            {
                ConfirmCancel.OnPopConfirmClickEvent(false);
            }
        }