123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354 |
- 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;
- this.studioCfgs = StudioDataManager.Instance.GetStudioCfgListByViewName(typeof(StudioPropertyView).FullName);
- _ui.m_listProperty.numItems = this.studioCfgs.Count;
- }
- protected override void OnHide()
- {
- base.OnHide();
- }
- private void OnClickBtnBack()
- {
- ViewManager.GoBackFrom(typeof(StudioPropertyView).FullName);
- }
- private void ListPropertyItemRender(int index, GObject obj)
- {
- UI_ListPropertyItem item = UI_ListPropertyItem.Proxy(obj);
- item.target.data = this.studioCfgs[index];
- }
- private void OnClickListProperty(EventContext context)
- {
- UI_ListPropertyItem item = UI_ListPropertyItem.Proxy(context.data as GObject);
- StudioCfg cfg = item.target.data as StudioCfg;
- }
- }
- }
|