| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667 | using UI.FieldGuide;using FairyGUI;using UnityEngine;using System.Collections.Generic;namespace GFGGame{    public class ChapterItemShowView : BaseWindow    {        private UI_ChapterItemShowUI _ui;        private CulturalRelicCfg _cfg;        public override void Dispose()        {            if (_ui != null)            {                _ui.Dispose();                _ui = null;            }            base.Dispose();        }        protected override void OnInit()        {            base.OnInit();            _ui = UI_ChapterItemShowUI.Create();            this.viewCom = _ui.target;            isfullScreen = true;            _ui.m_btnBack.onClick.Add(OnClickBtnBack);        }        protected override void OnShown()        {            base.OnShown();            _ui.m_loaBg.url = ResPathUtil.GetBgImgPath("tjtj_bjbj");            _cfg = this.viewData as CulturalRelicCfg;            UpdateView();        }        protected override void AddEventListener()        {            base.AddEventListener();        }        protected override void OnHide()        {            base.OnHide();        }        protected override void RemoveEventListener()        {            base.RemoveEventListener();        }        private void OnClickBtnBack()        {            ViewManager.GoBackFrom(typeof(ChapterItemShowView).FullName);        }        private void UpdateView()        {            _ui.m_loaItem.url = string.Format("ui://FieldGuide/{0}", _cfg.bgRes);            _ui.m_txtTitle.text = _cfg.name;            _ui.m_txtDesc.text = _cfg.desc;        }    }}
 |