| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778 | using FairyGUI;using System.Collections;using System.Collections.Generic;using UI.ActivityGetYuanXiao;using UI.CommonGame;namespace GFGGame{    class ActivityZLFGRewardTips : BaseWindow    {        private UI_RewardTipsUI _ui;        private PickUpGame _cfg;        public override void Dispose()        {            if (_ui != null)            {                _ui.Dispose();                _ui = null;            }            base.Dispose();        }        protected override void OnInit()        {            base.OnInit();            packageName = UI_RewardTipsUI.PACKAGE_NAME;            _ui = UI_RewardTipsUI.Create();            this.viewCom = _ui.target;            modal = true;            this.viewCom.Center();            viewAnimationType = EnumViewAnimationType.ZOOM_CENTER;            _ui.m_rewardList.itemRenderer = ListItemRender;            _ui.m_rewardList.onClickItem.Add(OnListSelectorItemClick);        }        protected override void OnShown()        {            base.OnShown();            _cfg = (PickUpGame)this.viewData;            _ui.m_rewardList.numItems = _cfg.bonusWinArr.Length;        }        protected override void OnHide()        {            base.OnHide();        }        protected override void AddEventListener()        {            base.AddEventListener();        }        protected override void RemoveEventListener()        {            base.RemoveEventListener();        }        private void OnClickChange()        {            this.Hide();        }        private void ListItemRender(int index, GObject obj)        {            UI_ComItem uiItemChild = UI_ComItem.Proxy(obj);            var itemCfg = ItemCfgArray.Instance.GetCfg(_cfg.bonusWinArr[index][0]);            var itemCfgChild = ItemCfgArray.Instance.GetCfg(_cfg.bonusWinArr[index][0]);            uiItemChild.m_loaIcon.url = ResPathUtil.GetIconPath(itemCfgChild);            uiItemChild.m_txtCount.text = _cfg.bonusWinArr[index][1].ToString();            uiItemChild.target.data = itemCfgChild;            uiItemChild.m_QualityType.selectedIndex = itemCfgChild.rarity - 1;            UI_ComItem.ProxyEnd();        }        //弹出物品详细描述框        private void OnListSelectorItemClick(EventContext context)        {            GComponent item = context.data as GComponent;            ItemCfg itemCfg = item.data as ItemCfg;            GoodsItemTipsController.ShowItemTips(itemCfg.id);        }    }}
 |