Преглед на файлове

商城月份领取物显示未知

huangxiaoyue преди 1 година
родител
ревизия
bb7d24ddcf

+ 3 - 0
GameClient/Assets/Game/HotUpdate/FairyGUI/GenCode/Store/UI_ListBlackRewardtem.cs

@@ -8,6 +8,7 @@ namespace UI.Store
     {
         public GComponent target;
         public Controller m_c1;
+        public Controller m_showItemType;
         public GLoader m_loaIcon;
         public GTextField m_txtMonth;
         public GGroup m_grpMonth;
@@ -62,6 +63,7 @@ namespace UI.Store
         private void Init(GComponent comp)
         {
             m_c1 = comp.GetController("c1");
+            m_showItemType = comp.GetController("showItemType");
             m_loaIcon = (GLoader)comp.GetChild("loaIcon");
             m_txtMonth = (GTextField)comp.GetChild("txtMonth");
             m_grpMonth = (GGroup)comp.GetChild("grpMonth");
@@ -72,6 +74,7 @@ namespace UI.Store
         public void Dispose(bool disposeTarget = false)
         {
             m_c1 = null;
+            m_showItemType = null;
             m_loaIcon = null;
             m_txtMonth = null;
             m_grpMonth = null;

+ 22 - 16
GameClient/Assets/Game/HotUpdate/Views/Store/StoreBlackCardRewardView.cs

@@ -39,12 +39,11 @@ namespace GFGGame
         protected override void AddEventListener()
         {
             base.AddEventListener();
-
         }
+
         protected override void OnShown()
         {
             base.OnShown();
-
             _month = TimeUtil.GetCurMonth();
             _ui.m_list.numItems = MonthlyCardClothesCfgArray.Instance.GetCfgsByyear(TimeUtil.GetCurYear()).Count;
         }
@@ -64,23 +63,30 @@ namespace GFGGame
         private void RenderListItem(int index, GObject obj)
         {
             UI_ListBlackRewardtem item = UI_ListBlackRewardtem.Proxy(obj);
+          
             MonthlyCardClothesCfg clothesCfg = MonthlyCardClothesCfgArray.Instance.GetCfgsByyear(TimeUtil.GetCurYear())[index];
-            ItemCfg itemCfg = ItemCfgArray.Instance.GetCfg(clothesCfg.clothesArr[0]);
-            item.m_loaIcon.url = ResPathUtil.GetIconPath(itemCfg);
-
-            item.m_txtMonth.text = string.Format("{0}月", clothesCfg.month);
-
-            bool isCurMonth = clothesCfg.month == _month;
-            item.m_imgMask.visible = !isCurMonth;
-            item.m_grpMonth.visible = isCurMonth;
-            item.m_grpName.visible = isCurMonth;
-            item.m_imggot.visible = MathUtil.isBitSet(GameGlobal.myNumericComponent.GetAsInt(NumericType.MonthCardExclusiveClothesMouth), clothesCfg.month);
-            if (item.target.data == null)
+            if (clothesCfg.clothesArr.Length == 0)
             {
-                item.target.onClick.Add(OnBtnGetClick);
+                item.m_showItemType.selectedIndex = 1;
+            }
+            else {
+                item.m_showItemType.selectedIndex = 0;
+                ItemCfg itemCfg = ItemCfgArray.Instance.GetCfg(clothesCfg.clothesArr[0]);
+                item.m_loaIcon.url = ResPathUtil.GetIconPath(itemCfg);
+
+                item.m_txtMonth.text = string.Format("{0}月", clothesCfg.month);
+
+                bool isCurMonth = clothesCfg.month == _month;
+                item.m_imgMask.visible = !isCurMonth;
+                item.m_grpMonth.visible = isCurMonth;
+                item.m_grpName.visible = isCurMonth;
+                item.m_imggot.visible = MathUtil.isBitSet(GameGlobal.myNumericComponent.GetAsInt(NumericType.MonthCardExclusiveClothesMouth), clothesCfg.month);
+                if (item.target.data == null)
+                {
+                    item.target.onClick.Add(OnBtnGetClick);
+                }
+                item.target.data = clothesCfg.month;
             }
-            item.target.data = clothesCfg.month;
-
             UI_ListBlackRewardtem.ProxyEnd();
         }
 

BIN
GameClient/Assets/ResIn/UI/Store/Store_fui.bytes