PoemView.cs 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  1. using ET;
  2. using FairyGUI;
  3. using UI.Poem;
  4. using UnityEngine;
  5. namespace GFGGame
  6. {
  7. public class PoemView : BaseWindow
  8. {
  9. private UI_PoemUI _ui;
  10. public override void Dispose()
  11. {
  12. if (_ui != null)
  13. {
  14. _ui.Dispose();
  15. _ui = null;
  16. }
  17. base.Dispose();
  18. }
  19. protected override void OnInit()
  20. {
  21. base.OnInit();
  22. packageName = UI_PoemUI.PACKAGE_NAME;
  23. _ui = UI_PoemUI.Create();
  24. this.viewCom = _ui.target;
  25. isfullScreen = true;
  26. _ui.m_loaBg.url = ResPathUtil.GetBgImgPath("gzs_bjbj");
  27. _ui.m_btnback.onClick.Add(OnBtnBackClick);
  28. _ui.m_comphoto.target.onClick.Add(OnComPhotoClick);
  29. }
  30. protected override void AddEventListener()
  31. {
  32. base.AddEventListener();
  33. }
  34. protected override void OnShown()
  35. {
  36. base.OnShown();
  37. }
  38. protected override void OnHide()
  39. {
  40. base.OnHide();
  41. }
  42. protected override void RemoveEventListener()
  43. {
  44. base.RemoveEventListener();
  45. }
  46. private void OnBtnBackClick()
  47. {
  48. ViewManager.GoBackFrom(typeof(PoemView).FullName);
  49. }
  50. private void OnComPhotoClick()
  51. {
  52. ViewManager.Show<PoemPhotoView>(null, new object[] { typeof(PoemView).FullName, this.viewData });
  53. }
  54. }
  55. }