1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374 |
- using ET;
- using FairyGUI;
- using UI.Poem;
- using UnityEngine;
- namespace GFGGame
- {
- public class PoemView : BaseWindow
- {
- private UI_PoemUI _ui;
- public override void Dispose()
- {
- if (_ui != null)
- {
- _ui.Dispose();
- _ui = null;
- }
- base.Dispose();
- }
- protected override void OnInit()
- {
- base.OnInit();
- packageName = UI_PoemUI.PACKAGE_NAME;
- _ui = UI_PoemUI.Create();
- this.viewCom = _ui.target;
- isfullScreen = true;
- _ui.m_loaBg.url = ResPathUtil.GetBgImgPath("zjm_11");
- _ui.m_btnback.onClick.Add(OnBtnBackClick);
- _ui.m_comphoto.target.onClick.Add(OnComPhotoClick);
- _ui.m_comGallery.target.onClick.Add(OnComGalleryClick);
- }
- protected override void AddEventListener()
- {
- base.AddEventListener();
- }
- protected override void OnShown()
- {
- base.OnShown();
- _ui.m_comphoto.m_c1.selectedIndex = FunctionOpenDataManager.Instance.CheckIsFunOpenById(typeof(PoemPhotoView).Name) ? 1 : 0;
- _ui.m_comGallery.m_c1.selectedIndex = FunctionOpenDataManager.Instance.CheckIsFunOpenById(typeof(PoemGalleryView).Name) ? 1 : 0;
- }
- protected override void OnHide()
- {
- base.OnHide();
- }
- protected override void RemoveEventListener()
- {
- base.RemoveEventListener();
- }
- private void OnBtnBackClick()
- {
- ViewManager.GoBackFrom(typeof(PoemView).FullName);
- }
- private void OnComPhotoClick()
- {
- ViewManager.Show<PoemPhotoView>(null, new object[] { typeof(PoemView).FullName, this.viewData });
- }
- private void OnComGalleryClick()
- {
- ViewManager.Show<PoemGalleryView>(null, new object[] { typeof(PoemView).FullName, this.viewData });
- }
- }
- }
|