|
@@ -3,6 +3,7 @@ using System.Collections.Generic;
|
|
|
using System.Linq;
|
|
|
using ET;
|
|
|
using FairyGUI;
|
|
|
+using UI.CommonGame;
|
|
|
using UI.EnduringGiftBox;
|
|
|
using UnityEngine;
|
|
|
|
|
@@ -329,6 +330,7 @@ namespace GFGGame
|
|
|
|
|
|
item.m_list.data = shopCfg;
|
|
|
item.m_list.itemRenderer = ChildListItemRender;
|
|
|
+ item.m_list.onClickItem.Add(OnListSelectorItemClick);
|
|
|
item.m_list.numItems = numItems;
|
|
|
}
|
|
|
|
|
@@ -393,7 +395,7 @@ namespace GFGGame
|
|
|
// ReSharper disable Unity.PerformanceAnalysis
|
|
|
private void ChildListItemRender(int index, GObject obj)
|
|
|
{
|
|
|
- UI_ComRewardIconItem uiItemChild = UI_ComRewardIconItem.Proxy(obj);
|
|
|
+ UI_ComItem uiItemChild = UI_ComItem.Proxy(obj);
|
|
|
var shopCfg = uiItemChild.target.parent.data as ShopCfg;
|
|
|
var itemCfg = ItemCfgArray.Instance.GetCfg(shopCfg.itemId);
|
|
|
// uiItemChild.m_showRreceives.visible = false;
|
|
@@ -402,46 +404,46 @@ namespace GFGGame
|
|
|
int[][] result;
|
|
|
if (shopCfg.refreshType == RefreshType.DAY)
|
|
|
{
|
|
|
- result = itemCfg.itemsArr;
|
|
|
- uiItemChild.m_bagYellow.visible = false;
|
|
|
- uiItemChild.m_bagBlue.visible = true;
|
|
|
- uiItemChild.m_bagYellowEx.visible = false;
|
|
|
- uiItemChild.m_bagBlueEx.visible = true;
|
|
|
+ result = itemCfg.itemsArr;
|
|
|
+ // uiItemChild.m_bagYellow.visible = false;
|
|
|
+ // uiItemChild.m_bagBlue.visible = true;
|
|
|
+ // uiItemChild.m_bagYellowEx.visible = false;
|
|
|
+ // uiItemChild.m_bagBlueEx.visible = true;
|
|
|
}
|
|
|
else
|
|
|
{
|
|
|
//周刷
|
|
|
result = itemCfg.param1Arr;
|
|
|
- uiItemChild.m_bagYellow.visible = true;
|
|
|
- uiItemChild.m_bagBlue.visible = false;
|
|
|
- uiItemChild.m_bagYellowEx.visible = true;
|
|
|
- uiItemChild.m_bagBlueEx.visible = false;
|
|
|
- }
|
|
|
+ // uiItemChild.m_bagYellow.visible = true;
|
|
|
+ // uiItemChild.m_bagBlue.visible = false;
|
|
|
+ // uiItemChild.m_bagYellowEx.visible = true;
|
|
|
+ // uiItemChild.m_bagBlueEx.visible = false;
|
|
|
+ }
|
|
|
|
|
|
- // if (curGiftBoxState == EnduringGiftBoxBuyStatus.YesGet)
|
|
|
- // {
|
|
|
- // uiItemChild.m_showRreceives.visible = true;
|
|
|
- // }
|
|
|
- // else if (curGiftBoxState == EnduringGiftBoxBuyStatus.NoGet)
|
|
|
- // {
|
|
|
- // uiItemChild.m_showRreceives.visible = false;
|
|
|
- // }
|
|
|
+ // if (curGiftBoxState == EnduringGiftBoxBuyStatus.YesGet)
|
|
|
+ // {
|
|
|
+ // uiItemChild.m_showRreceives.visible = true;
|
|
|
+ // }
|
|
|
+ // else if (curGiftBoxState == EnduringGiftBoxBuyStatus.NoGet)
|
|
|
+ // {
|
|
|
+ // uiItemChild.m_showRreceives.visible = false;
|
|
|
+ // }
|
|
|
|
|
|
var itemArr = result[index];
|
|
|
var itemCfgChild = ItemCfgArray.Instance.GetCfg(itemArr[0]);
|
|
|
- uiItemChild.m_loaIcon.onClick.Add(OnListSelectorItemClick);
|
|
|
- uiItemChild.m_loaIcon.url = ResPathUtil.GetIconPath(itemCfgChild);
|
|
|
- uiItemChild.m_num.text = itemArr[1].ToString();
|
|
|
uiItemChild.target.data = itemCfgChild;
|
|
|
- UI_ComRewardIconItem.ProxyEnd();
|
|
|
+ uiItemChild.m_txtCount.text = itemArr[1].ToString();
|
|
|
+ uiItemChild.m_loaIcon.url = ResPathUtil.GetIconPath(itemCfgChild);
|
|
|
+ uiItemChild.m_QualityType.selectedIndex = itemCfgChild.rarity - 1;
|
|
|
+
|
|
|
+ UI_ComItem.ProxyEnd();
|
|
|
}
|
|
|
|
|
|
//弹出物品详细描述框
|
|
|
private void OnListSelectorItemClick(EventContext context)
|
|
|
{
|
|
|
- GObject sender = context.sender as GObject;
|
|
|
- GObject obj = sender.parent;
|
|
|
- ItemCfg itemCfg = obj.data as ItemCfg;
|
|
|
+ GComponent item = context.data as GComponent;
|
|
|
+ ItemCfg itemCfg = item.data as ItemCfg;
|
|
|
GoodsItemTipsController.ShowItemTips(itemCfg.id);
|
|
|
}
|
|
|
|