| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869 | 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;            isReturnView = 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();            _ui.m_Idle.Play(-1, 0, null);        }        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 = ResPathUtil.GetChapterGuideIconPath(_cfg.bgRes); //string.Format("ui://FieldGuide/{0}", _cfg.bgRes);            _ui.m_txtTitle.text = _cfg.name;            _ui.m_txtDesc.text = _cfg.desc;        }    }}
 |