12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879 |
- using System;
- using System.Collections.Generic;
- using ET;
- using FairyGUI;
- using UI.MatchingCompetition;
- using UnityEngine;
- namespace GFGGame
- {
- class MatchingCompetitionWorksListView : BaseWindow
- {
- private UI_MatchingCompetitionWorkListUI _ui;
- private int _seasonIndex = 0;
- public override void Dispose()
- {
- if (_ui != null)
- {
- _ui.Dispose();
- }
- _ui = null;
- base.Dispose();
- }
- protected override void OnInit()
- {
- base.OnInit();
- packageName = UI_MatchingCompetitionWorkListUI.PACKAGE_NAME;
- _ui = UI_MatchingCompetitionWorkListUI.Create();
- this.viewCom = _ui.target;
- isReturnView = true;
- isfullScreen = true;
- _ui.m_workList.itemRenderer = RenderRankList;
- _ui.m_BtnBack.onClick.Add(OnClickBtnBack);
- }
- protected override void AddEventListener()
- {
- base.AddEventListener();
- }
- protected override void OnShown()
- {
- base.OnShown();
- _ui.m_bg.url = ResPathUtil.GetBgImgPath("gzs_fb_bj");
- _seasonIndex = (int)this.viewData;
- UpdateView();
- }
- protected override void OnHide()
- {
- base.OnHide();
- }
- protected override void RemoveEventListener()
- {
- base.RemoveEventListener();
- }
- private void UpdateView()
- {
- _ui.m_workList.numItems = 2;
- }
- private void RenderRankList(int index, GObject obj)
- {
- UI_Component6 item = UI_Component6.Proxy(obj);
- if((index +1) >=1 && (index + 1)<=3)
- {
- item.m_c1.selectedIndex = index + 1;
- }
- else
- {
- item.m_c1.selectedIndex = 0;
- }
- UI_Component6.ProxyEnd();
- }
- private void OnClickBtnBack()
- {
- ViewManager.GoBackFrom(typeof(MatchingCompetitionWorksListView).FullName);
- }
- }
- }
|