|
@@ -120,6 +120,7 @@ namespace GFGGame
|
|
|
if (item.m_listGiftBag.data == null)
|
|
|
{
|
|
|
item.m_listGiftBag.itemRenderer = ListRewardItemRender;
|
|
|
+ item.m_listGiftBag.onClickItem.Add(OnListItemClick);
|
|
|
}
|
|
|
item.m_listGiftBag.data = lastVipCfg.bonusOnceArr;
|
|
|
item.m_listGiftBag.numItems = lastVipCfg.bonusOnceArr.Length;
|
|
@@ -162,14 +163,14 @@ namespace GFGGame
|
|
|
private void ListRewardItemRender(int index, GObject obj)
|
|
|
{
|
|
|
int[][] rewards = (int[][])obj.parent.data;
|
|
|
-
|
|
|
- if (obj.data == null)
|
|
|
- {
|
|
|
- obj.data = new ItemView(obj as GComponent);
|
|
|
- }
|
|
|
+ UI_ComItem item = UI_ComItem.Proxy(obj);
|
|
|
ItemData itemData = ItemUtil.createItemData(rewards[index]);
|
|
|
- (obj.data as ItemView).SetData(itemData);
|
|
|
- (obj.data as ItemView).ChangeTxtCountStyle();
|
|
|
+ ItemCfg itemCfg = ItemCfgArray.Instance.GetCfg(itemData.id);
|
|
|
+ item.m_txtCount.text = itemData.num.ToString();
|
|
|
+ item.target.data = itemCfg;
|
|
|
+ item.m_QualityType.selectedIndex = itemData.rarity - 1;
|
|
|
+ item.m_loaIcon.url = ResPathUtil.GetIconPath(itemCfg);
|
|
|
+ UI_ComItem.ProxyEnd();
|
|
|
}
|
|
|
|
|
|
private void OnBtnShowClick(EventContext context)
|
|
@@ -267,5 +268,12 @@ namespace GFGGame
|
|
|
RedDotController.Instance.SetComRedDot(_ui.m_btnRight, rightRed);
|
|
|
|
|
|
}
|
|
|
+
|
|
|
+ private void OnListItemClick(EventContext context)
|
|
|
+ {
|
|
|
+ GComponent comItem = (context.data as GComponent);
|
|
|
+ ItemCfg itemCfg = comItem.data as ItemCfg;
|
|
|
+ GoodsItemTipsController.ShowItemTips(itemCfg.id);
|
|
|
+ }
|
|
|
}
|
|
|
}
|