|
@@ -39,12 +39,11 @@ namespace GFGGame
|
|
protected override void AddEventListener()
|
|
protected override void AddEventListener()
|
|
{
|
|
{
|
|
base.AddEventListener();
|
|
base.AddEventListener();
|
|
-
|
|
|
|
}
|
|
}
|
|
|
|
+
|
|
protected override void OnShown()
|
|
protected override void OnShown()
|
|
{
|
|
{
|
|
base.OnShown();
|
|
base.OnShown();
|
|
-
|
|
|
|
_month = TimeUtil.GetCurMonth();
|
|
_month = TimeUtil.GetCurMonth();
|
|
_ui.m_list.numItems = MonthlyCardClothesCfgArray.Instance.GetCfgsByyear(TimeUtil.GetCurYear()).Count;
|
|
_ui.m_list.numItems = MonthlyCardClothesCfgArray.Instance.GetCfgsByyear(TimeUtil.GetCurYear()).Count;
|
|
}
|
|
}
|
|
@@ -64,23 +63,30 @@ namespace GFGGame
|
|
private void RenderListItem(int index, GObject obj)
|
|
private void RenderListItem(int index, GObject obj)
|
|
{
|
|
{
|
|
UI_ListBlackRewardtem item = UI_ListBlackRewardtem.Proxy(obj);
|
|
UI_ListBlackRewardtem item = UI_ListBlackRewardtem.Proxy(obj);
|
|
|
|
+
|
|
MonthlyCardClothesCfg clothesCfg = MonthlyCardClothesCfgArray.Instance.GetCfgsByyear(TimeUtil.GetCurYear())[index];
|
|
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();
|
|
UI_ListBlackRewardtem.ProxyEnd();
|
|
}
|
|
}
|
|
|
|
|