Browse Source

限时累充活动入口添加

zhangyuqian 1 year ago
parent
commit
a7e714bcd8

+ 12 - 0
GameClient/Assets/Game/HotUpdate/Views/DailyWelfare/DailyWelfareView.cs

@@ -71,6 +71,7 @@ namespace GFGGame
             || ActivityDataManager.Instance.AllSevenDayBonusGot());
 
             _limitChargeInfo = ActivityGlobalDataManager.Instance.GetActivityInfoByType(ActivityType.XSLC);
+            _limitChargeInfo.Add(ActivityGlobalDataManager.Instance.GetActivityInfoByType(ActivityType.OpenServerCharge)[0]);
             _ui.m_comList.m_listLimitCharge.numItems = _limitChargeInfo.Count;
             _ui.m_comList.m_listLimitCharge.ResizeToFit();
 
@@ -122,6 +123,11 @@ namespace GFGGame
                 item.m_loaIcon.url = "ui://DailyWelfare/hdbn_xslc_" + openCfg.res;
                 item.m_loaTitle.url = "ui://DailyWelfare/hdbn_wz_xslc_" + openCfg.res;
             }
+            if (openCfg.id == 501)
+            {
+                item.m_loaIcon.url = "ui://DailyWelfare/hdbn_xslc_xslgt";
+                item.m_loaTitle.url = "ui://DailyWelfare/hdbn_wz_xslc_xslgt";
+            }
             if (item.target.data == null)
             {
                 item.target.onClick.Add(OnBtnLimitChargeAddUpClick);
@@ -136,7 +142,13 @@ namespace GFGGame
         private void OnBtnLimitChargeAddUpClick(EventContext context)
         {
             GObject gObject = context.sender as GObject;
+            int id = (int)gObject.data;
 
+            if (id == 501)
+            {
+                ViewManager.Show<NewLimitChargeView>(new object[] { gObject.data }, new object[] { typeof(DailyWelfareView).FullName, this.viewData });
+                return;
+            }
             ViewManager.Show<LimitChargeView>(new object[] { gObject.data }, new object[] { typeof(DailyWelfareView).FullName, this.viewData });
         }
         private void OnBtnSevenDayLoginClick()

+ 3 - 0
GameClient/Assets/Game/HotUpdate/Views/DailyWelfare/NewLimitChargeView.cs

@@ -97,6 +97,9 @@ namespace GFGGame
             _ui.m_btnLeft.visible = _curSelectIndex == 0 ? false : true;
             _ui.m_btnRight.visible = _curSelectIndex < _ui.m_list.numItems - 1 ? true : false;
 
+            _ui.m_list.ScrollToView(_curSelectIndex);
+            _ui.m_packageName.text = SuitCfgArray.Instance.GetCfg(_rechargeCfgs[_curSelectIndex].suitId).name;
+
             Timers.inst.Add(1, 0, UpdateTime);
         }