123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960 |
- using System.Collections.Generic;
- using FairyGUI;
- using UI.Studio;
- namespace GFGGame
- {
- public class StudioPropertyView : StudioBaseView
- {
- //书画副本
- public override void Dispose()
- {
- base.Dispose();
- }
- protected override void OnInit()
- {
- base.OnInit();
- _ui.m_btnBack.onClick.Add(OnClickBtnBack);
- _ui.m_listProperty.itemRenderer = ListPropertyItemRender;
- _ui.m_listProperty.onClickItem.Add(OnClickListProperty);
- }
- protected override void OnShown()
- {
- base.OnShown();
- _ui.m_c1.selectedIndex = 1;
- _ui.m_listProperty.numItems = StudioDataManager.Instance.GetStudioCfgListByViewName(typeof(StudioPropertyView).FullName).Count;
- }
- protected override void OnHide()
- {
- base.OnHide();
- }
- private void OnClickBtnBack()
- {
- ViewManager.GoBackFrom(typeof(StudioPropertyView).FullName);
- }
- private void ListPropertyItemRender(int index, GObject obj)
- {
- GButton item = obj.asButton;
- item.data = StudioDataManager.Instance.GetStudioCfgListByViewName(typeof(StudioPropertyView).FullName)[index];
- }
- private void OnClickListProperty(EventContext context)
- {
- GButton item = (context.data as GObject).asButton;
- // UI_ListPropertyItem item = UI_ListPropertyItem.Proxy(context.data as GObject);
- this.studioCfg = item.data as StudioCfg;
- this.storyLevelCfgs = new List<StoryLevelCfg>();
- _ui.m_list.numItems = this.storyLevelCfgs.Count;
- }
- }
- }
|