瀏覽代碼

限时累充

zhangyuqian 1 年之前
父節點
當前提交
d3aa4ae854

+ 8 - 5
GameClient/Assets/Game/HotUpdate/FairyGUI/GenCode/DailyWelfare/UI_NewLimitChargeUI.cs

@@ -8,14 +8,15 @@ namespace UI.DailyWelfare
     {
         public GComponent target;
         public GLoader m_loaBg;
+        public GList m_list;
         public GButton m_btnBack;
+        public GLoader m_name;
         public GTextField m_packageName;
         public GTextField m_txtTime;
         public GGroup m_grpTime;
-        public GList m_list;
         public GButton m_btnRight;
         public GButton m_btnLeft;
-        public GButton m_btnCharge;
+        public GLoader m_btnCharge;
         public const string URL = "ui://t8nwuj7idn9y2h";
         public const string PACKAGE_NAME = "DailyWelfare";
         public const string RES_NAME = "NewLimitChargeUI";
@@ -64,23 +65,25 @@ namespace UI.DailyWelfare
         private void Init(GComponent comp)
         {
             m_loaBg = (GLoader)comp.GetChild("loaBg");
+            m_list = (GList)comp.GetChild("list");
             m_btnBack = (GButton)comp.GetChild("btnBack");
+            m_name = (GLoader)comp.GetChild("name");
             m_packageName = (GTextField)comp.GetChild("packageName");
             m_txtTime = (GTextField)comp.GetChild("txtTime");
             m_grpTime = (GGroup)comp.GetChild("grpTime");
-            m_list = (GList)comp.GetChild("list");
             m_btnRight = (GButton)comp.GetChild("btnRight");
             m_btnLeft = (GButton)comp.GetChild("btnLeft");
-            m_btnCharge = (GButton)comp.GetChild("btnCharge");
+            m_btnCharge = (GLoader)comp.GetChild("btnCharge");
         }
         public void Dispose(bool disposeTarget = false)
         {
             m_loaBg = null;
+            m_list = null;
             m_btnBack = null;
+            m_name = null;
             m_packageName = null;
             m_txtTime = null;
             m_grpTime = null;
-            m_list = null;
             m_btnRight = null;
             m_btnLeft = null;
             m_btnCharge = null;

+ 26 - 5
GameClient/Assets/Game/HotUpdate/Views/DailyWelfare/NewLimitChargeView.cs

@@ -60,7 +60,7 @@ namespace GFGGame
 
             _ui.m_list.itemRenderer = ListItemRenderer;
             _ui.m_list.SetVirtual();
-            _ui.m_list.scrollPane.onScrollEnd.Add(UpdateSuitView);
+            //_ui.m_list.scrollPane.onScrollEnd.Add(UpdateSuitView);
             _ui.m_list.scrollPane.decelerationRate = 0.8f;
 
             _ui.m_btnLeft.onClick.Add(OnBtnLeftClick);
@@ -78,10 +78,11 @@ namespace GFGGame
         {
             base.OnShown();
 
+
+            _ui.m_loaBg.url = ResPathUtil.GetBgImgPath("bg_fhl");
             //_curSelectIndex = Math.Max(0, RoleDataManager.vipLv - 1);
             //_ui.m_list.selectedIndex = _curSelectIndex;
             //_ui.m_list.ScrollToView(_curSelectIndex);
-
             //_activityId = 501;
             _activityId = (int)(this.viewData as object[])[0];
             _rechargeCfgs = ActivityRechargeCfgArray.Instance.GetCfgsByactivityId(_activityId);
@@ -89,6 +90,10 @@ namespace GFGGame
             //UpdateRedDot();
             
             RefreshList();
+
+            string name = SuitCfgArray.Instance.GetCfg(_rechargeCfgs[0].suitId).name;
+            _ui.m_packageName.text = name;
+
             _ui.m_btnLeft.visible = _curSelectIndex == 0 ? false : true;
             _ui.m_btnRight.visible = _curSelectIndex < _ui.m_list.numItems - 1 ? true : false;
 
@@ -127,7 +132,17 @@ namespace GFGGame
             item.m_txtName2.text = name.Length > 2 ? name.Substring(2, 1) : "";
             item.m_txtName3.text = name.Length > 3 ? name.Substring(3, 1) : "";
             item.m_txtName4.text = name.Length > 4 ? name.Substring(4) : "";
-            _ui.m_packageName.text = name;
+            if (vipCfg.res != "")
+            {
+                item.m_cardIcon.visible = true;
+                item.m_cardBg.visible = true;
+                item.m_cardIcon.url = "ui://DailyWelfare/" + vipCfg.res;
+            }
+            else
+            {
+                item.m_cardIcon.visible = false;
+                item.m_cardBg.visible = false;
+            }
             if (item.m_listGiftBag.data == null)
             {
                 item.m_listGiftBag.itemRenderer = ListRewardItemRender;
@@ -211,14 +226,20 @@ namespace GFGGame
 
             if (_curSelectIndex == 0) return;
             _curSelectIndex = _curSelectIndex - 1;
-            _ui.m_list.ScrollToView(_curSelectIndex, true);
+            _ui.m_list.ScrollToView(_curSelectIndex);
+            string name = SuitCfgArray.Instance.GetCfg(_rechargeCfgs[_curSelectIndex].suitId).name;
+            _ui.m_packageName.text = name;
+            UpdateSuitView();
             //UpdateRedDot();
         }
         private void OnBtnRightClick()
         {
             if (_curSelectIndex == _ui.m_list.numItems - 1) return;
             _curSelectIndex = _curSelectIndex + 1;
-            _ui.m_list.ScrollToView(_curSelectIndex, true);
+            _ui.m_list.ScrollToView(_curSelectIndex);
+            string name = SuitCfgArray.Instance.GetCfg(_rechargeCfgs[_curSelectIndex].suitId).name;
+            _ui.m_packageName.text = name;
+            UpdateSuitView();
             //UpdateRedDot();
 
         }

+ 10 - 1
GameClient/Assets/Game/HotUpdate/Views/FieldGuide/SuitShowView.cs

@@ -77,7 +77,16 @@ namespace GFGGame
                 }
             }
             SuitGuideMenuCfg cfg = SuitGuideMenuCfgArray.Instance.GetCfg(_suitTypeId);
-            _ui.m_txtTypeName.text = cfg.name;
+            if (cfg == null)
+            {
+                SuitCfg suitCfg = SuitCfgArray.Instance.GetCfg(_suitId);
+                _ui.m_txtSuitName.text = suitCfg.name;
+            }
+            else
+            {
+                _ui.m_txtTypeName.text = cfg.name;
+            }
+           
             _ui.m_loaBg.url = ResPathUtil.GetBgImgPath("tjtj_bjbj");
 
             UpdateArrows();

二進制
GameClient/Assets/ResIn/UI/DailyWelfare/DailyWelfare_atlas0!a.png


二進制
GameClient/Assets/ResIn/UI/DailyWelfare/DailyWelfare_atlas0.png


二進制
GameClient/Assets/ResIn/UI/DailyWelfare/DailyWelfare_atlas0_1!a.png


二進制
GameClient/Assets/ResIn/UI/DailyWelfare/DailyWelfare_atlas0_1.png


二進制
GameClient/Assets/ResIn/UI/DailyWelfare/DailyWelfare_atlas0_2!a.png


二進制
GameClient/Assets/ResIn/UI/DailyWelfare/DailyWelfare_atlas0_2.png


二進制
GameClient/Assets/ResIn/UI/DailyWelfare/DailyWelfare_atlas0_3!a.png


二進制
GameClient/Assets/ResIn/UI/DailyWelfare/DailyWelfare_atlas0_3.png


二進制
GameClient/Assets/ResIn/UI/DailyWelfare/DailyWelfare_atlas0_4!a.png


二進制
GameClient/Assets/ResIn/UI/DailyWelfare/DailyWelfare_atlas0_4.png


二進制
GameClient/Assets/ResIn/UI/DailyWelfare/DailyWelfare_atlas0_5!a.png


二進制
GameClient/Assets/ResIn/UI/DailyWelfare/DailyWelfare_atlas0_5.png


二進制
GameClient/Assets/ResIn/UI/DailyWelfare/DailyWelfare_fui.bytes