浏览代码

摘星提示问号修改,增加许愿选择提示弹窗

huangxiaoyue 1 年之前
父节点
当前提交
f68fb23f9b

+ 0 - 3
GameClient/Assets/Game/HotUpdate/FairyGUI/GenCode/LuckyBox/UI_ComBox1.cs

@@ -13,7 +13,6 @@ namespace UI.LuckyBox
         public GTextField m_txtTsyTime;
         public GTextField m_txtTime;
         public GGroup m_grpTime;
-        public GButton m_btnRule;
         public GGroup m_grpTitle;
         public GButton m_btnGiftBag;
         public UI_ComBagTime m_comBagTime;
@@ -76,7 +75,6 @@ namespace UI.LuckyBox
             m_txtTsyTime = (GTextField)comp.GetChild("txtTsyTime");
             m_txtTime = (GTextField)comp.GetChild("txtTime");
             m_grpTime = (GGroup)comp.GetChild("grpTime");
-            m_btnRule = (GButton)comp.GetChild("btnRule");
             m_grpTitle = (GGroup)comp.GetChild("grpTitle");
             m_btnGiftBag = (GButton)comp.GetChild("btnGiftBag");
             m_comBagTime = (UI_ComBagTime)UI_ComBagTime.Create(comp.GetChild("comBagTime"));
@@ -96,7 +94,6 @@ namespace UI.LuckyBox
             m_txtTsyTime = null;
             m_txtTime = null;
             m_grpTime = null;
-            m_btnRule = null;
             m_grpTitle = null;
             m_btnGiftBag = null;
             m_comBagTime.Dispose();

+ 3 - 0
GameClient/Assets/Game/HotUpdate/FairyGUI/GenCode/LuckyBox/UI_LuckyBoxWishUI.cs

@@ -9,6 +9,7 @@ namespace UI.LuckyBox
         public GComponent target;
         public GButton m_btnWish1;
         public GButton m_btnWish2;
+        public GButton m_btnRule;
         public const string URL = "ui://drx9d1usnlyjtqb";
         public const string PACKAGE_NAME = "LuckyBox";
         public const string RES_NAME = "LuckyBoxWishUI";
@@ -58,11 +59,13 @@ namespace UI.LuckyBox
         {
             m_btnWish1 = (GButton)comp.GetChild("btnWish1");
             m_btnWish2 = (GButton)comp.GetChild("btnWish2");
+            m_btnRule = (GButton)comp.GetChild("btnRule");
         }
         public void Dispose(bool disposeTarget = false)
         {
             m_btnWish1 = null;
             m_btnWish2 = null;
+            m_btnRule = null;
             if(disposeTarget && target != null)
             {
                 target.RemoveFromParent();

+ 0 - 5
GameClient/Assets/Game/HotUpdate/Views/LuckyBox/LuckyBoxView.cs

@@ -239,11 +239,6 @@ namespace GFGGame
             {
                 comBox.m_showActivityType.selectedIndex = 1;
                 UpGiftBox(comBox);
-                if (comBox.m_btnRule.data == null)
-                {
-                    comBox.m_btnRule.onClick.Add(RuleController.ShowRuleView);
-                    comBox.m_btnRule.data = 300024;
-                }
             }
             else 
                 comBox.m_showActivityType.selectedIndex = 0;

+ 13 - 2
GameClient/Assets/Game/HotUpdate/Views/LuckyBox/LuckyBoxWishView.cs

@@ -33,6 +33,8 @@ namespace GFGGame
             _ui.m_btnWish1.onClick.Add(OnClickBtnWish);
             _ui.m_btnWish2.data = 1;
             _ui.m_btnWish2.onClick.Add(OnClickBtnWish);
+            _ui.m_btnRule.onClick.Add(RuleController.ShowRuleView);
+            _ui.m_btnRule.data = 300024;
         }
         protected override void AddEventListener()
         {
@@ -60,8 +62,11 @@ namespace GFGGame
         private void OnClickBtnWish(EventContext context)
         {
             int index = (int)(context.sender as GObject).data;
-            ReqAddWishingPoolInfo(index);
-            this.Hide();
+            int activityId = ActivityDataManager.Instance.GetCurOpenActiveByType(_actLimitTsy);
+            ActivityOpenCfg activityOpenCfg = ActivityOpenCfgArray.Instance.GetCfg(activityId);
+            var suitId = activityOpenCfg.params2Arr[index];
+            var suitCfg = SuitCfgArray.Instance.GetCfg(suitId);
+            AlertUI.Show(string.Format("是否将{0}设为许愿套装(许愿后将不可修改,请研究员谨慎选择)", suitCfg.name)).SetLeftButton(true).SetRightButton(true, "确定", (object data) => { onSuccess(index); });
         }
 
         private async void ReqAddWishingPoolInfo(int index)
@@ -74,5 +79,11 @@ namespace GFGGame
              
             }
         }
+
+        private void onSuccess(int index)
+        {
+            ReqAddWishingPoolInfo(index);
+            this.Hide();
+        }
     }
 }

二进制
GameClient/Assets/ResIn/UI/BornLimit/BornLimit_fui.bytes


二进制
GameClient/Assets/ResIn/UI/LuckyBox/LuckyBox_fui.bytes