using System; using System.Collections.Generic; using ET; using FairyGUI; using UI.CommonGame; using UI.ClothingUpgrade; using UnityEngine; namespace GFGGame { public class ClothingSelectView : BaseWindow { private UI_ClothingSelectUI _ui; public override void Dispose() { base.Dispose(); } protected override void OnInit() { base.OnInit(); packageName = UI_ClothingSelectUI.PACKAGE_NAME; _ui = UI_ClothingSelectUI.Create(); this.viewCom = _ui.target; isfullScreen = true; modal = true; _ui.m_btnBack.onClick.Add(OnClickBtnBack); _ui.m_selectList.itemRenderer = RenderListItem; } protected override void OnShown() { base.OnShown(); UpdateList(); } protected override void OnHide() { base.OnHide(); } private void RenderListItem(int index, GObject obj) { UI_clothingSelectItem listItem = UI_clothingSelectItem.Proxy(obj); if (listItem.target.data == null) { listItem.target.onClick.Add(OnBtnItem); } listItem.target.data = index; UI_clothingSelectItem.ProxyEnd(); } private void OnBtnItem(EventContext context) { GObject Item = context.sender as GObject; int partIndex = (int)Item.data; ViewManager.Show(new object[] {partIndex }); } private void OnClickBtnBack() { ViewManager.GoBackFrom(typeof(ClothingSelectView).FullName); } private void UpdateList() { } } }