| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176 |
- // using System.Collections.Generic;
- // using System.Linq;
- // using ET;
- // using FairyGUI;
- // using UI.BagEquipment;
- // using UI.Poem;
- // using UnityEngine;
- // using UI_Button6 = UI.BagEquipment.UI_Button6;
- // using UI_ComPhotoPostcard = UI.BagEquipment.UI_ComPhotoPostcard;
- // using UI_ListPhotoItem = UI.BagEquipment.UI_ListPhotoItem;
- //
- // namespace GFGGame
- // {
- //
- // public class BagEquipmentView : BaseWindow
- // {
- // private UI_BagEquipmentUI _ui;
- // private List<long> _listChoose = new List<long>();
- // private List<BagEquipmentData> _bagagEquipmentInfos;
- // private long equipmentDicKey;
- // public override void Dispose()
- // {
- // if (_ui != null)
- // {
- // _ui.Dispose();
- // _ui = null;
- // }
- // base.Dispose();
- // }
- //
- // protected override void OnInit()
- // {
- // base.OnInit();
- // packageName = UI_BagEquipmentUI.PACKAGE_NAME;
- // _ui = UI_BagEquipmentUI.Create();
- // this.viewCom = _ui.target;
- // isfullScreen = true;
- // isReturnView = true;
- //
- // _ui.m_list.SetVirtual();
- // _ui.m_list.itemRenderer = RenderListItem;
- // _ui.m_listTravel.SetVirtual();
- // _ui.m_listTravel.itemRenderer = RenderListTravelItem;
- // _ui.m_list.onClickItem.Add(OnListItemClick);
- //
- // _ui.m_btnback.onClick.Add(OnBtnBackClick);
- // _ui.m_c1.onChanged.Add(OnBtnTabChange);
- //
- // InitTypeList();
- // }
- //
- // private void OnBtnBackClick()
- // {
- // if (_ui.m_c2.selectedIndex == 1)
- // {
- // _ui.m_c2.selectedIndex = 0;
- // }
- // else
- // {
- // ViewManager.GoBackFrom(typeof(BagEquipmentView).FullName);
- // if (_ui.m_list.numItems > 0) _ui.m_list.ScrollToView(0);
- // _ui.m_c1.selectedIndex = 0;
- // }
- // _ui.m_c2.selectedIndex = 0;
- //
- // }
- //
- //
- // private void RenderListItem(int index, GObject obj)
- // {
- // UI_ListPhotoItem item = UI_ListPhotoItem.Proxy(obj);
- // if (_ui.m_c2.selectedIndex != 0 && _listChoose.IndexOf(_bagagEquipmentInfos[index].PictureId) >= 0)
- // {
- // item.m_c1.SetSelectedIndex(1);
- // }
- // else
- // {
- // item.m_c1.SetSelectedIndex(0);
- // }
- //
- // //将数据绑定到list列表里
- // BagEquipmentComponent equipmentComponent = GameGlobal.zoneScene.GetComponent<BagEquipmentComponent>();
- // if (equipmentComponent!=null)
- // {
- // if (equipmentComponent.EquipmentDic.Count>=index)
- // {
- // var equipmentlementAt = equipmentComponent.EquipmentDic.ElementAt(index).Value;
- // equipmentDicKey = equipmentComponent.EquipmentDic.ElementAt(index).Key;
- // item.m_txtTime.text = EquipmentCfgArray.Instance.GetCfg(equipmentlementAt.ConfigId).Name;
- // CommonDataManager.Tables.tbleq
- // }
- // }
- //
- // UI_ListPhotoItem.ProxyEnd();
- // }
- //
- // private void RenderListTravelItem(int index, GObject obj)
- // {
- // UI_ComPhotoPostcard item = UI_ComPhotoPostcard.Proxy(obj);
- // item.m_c1.selectedIndex = _ui.m_c2.selectedIndex != 0 && _listChoose.IndexOf(_bagagEquipmentInfos[index].PictureId) >= 0 ? 1 : 0;
- // UI_ComPhotoPostcard.ProxyEnd();
- // }
- //
- // private void OnBtnTabChange()
- // {
- // _ui.m_c2.selectedIndex = 0;
- // _listChoose.Clear();
- // UpdateView();
- //
- // }
- // private void UpdateView()
- // {
- // if (_ui.m_c1.selectedIndex == 0)
- // {
- // BagEquipmentComponent equipmentComponent = GameGlobal.zoneScene.GetComponent<BagEquipmentComponent>();
- // _ui.m_listTravel.numItems = 0;
- // _ui.m_list.numItems = equipmentComponent.EquipmentDic.Count;
- // }
- // else if(_ui.m_c1.selectedIndex == 1)
- // {
- // //_bagagEquipmentInfos = BagEquipmentDataManager.Instance.BagMaterialDatas;
- // _ui.m_list.numItems = 0;
- // _ui.m_listTravel.numItems = 10;
- // }
- // else if(_ui.m_c1.selectedIndex == 2)
- // {
- // _ui.m_list.numItems = 0;
- // _ui.m_listTravel.numItems = 0;
- // }
- // }
- //
- // protected override void AddEventListener()
- // {
- // base.AddEventListener();
- // EventAgent.AddEventListener(ConstMessage.UpBagEquipment, OnBtnTabChange);
- //
- // }
- // protected override void RemoveEventListener()
- // {
- // base.RemoveEventListener();
- // EventAgent.RemoveEventListener(ConstMessage.UpBagEquipment, OnBtnTabChange);
- //
- // }
- //
- // protected override void OnShown()
- // {
- // base.OnShown();
- // if (this.viewData != null)
- // {
- // _ui.m_c1.selectedIndex = (int)this.viewData;
- // }
- // OnBtnTabChange();
- //
- // //Timers.inst.AddUpdate(CheckGuide);
- // }
- //
- // /// <summary>
- // /// 初始化分类菜单文本,点击和未点击是两种样式,需要统一文字
- // /// </summary>
- // private void InitTypeList()
- // {
- // for (int i = 0; i < _ui.m_typeList.numChildren; i++)
- // {
- // UI_Button6 button6 = UI_Button6.Proxy(_ui.m_typeList.GetChildAt(i));
- // button6.m_title1.text = button6.target.title;
- // UI_Button6.ProxyEnd();
- // }
- // }
- //
- // private void OnListItemClick(EventContext context)
- // {
- // ViewManager.Show<EquipmentExchangeView>(equipmentDicKey);//equipmentDicKey:给子页面传数据
- // }
- //
- // }
- // }
|