NoticeSystemShowView.cs 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. using UnityEngine;
  2. using FairyGUI;
  3. using UI.Notice;
  4. namespace GFGGame
  5. {
  6. public class NoticeSystemShowView : BaseWindow
  7. {
  8. private UI_NoticeSystemShowUI _ui;
  9. public override void Dispose()
  10. {
  11. base.Dispose();
  12. }
  13. protected override void Init()
  14. {
  15. base.Init();
  16. packageName = UI_NoticeSystemShowUI.PACKAGE_NAME;
  17. _ui = UI_NoticeSystemShowUI.Create();
  18. this.viewCom = _ui.target;
  19. isfullScreen = true;
  20. this.clickBlankToClose = false;
  21. }
  22. protected override void OnInit()
  23. {
  24. base.OnInit();
  25. _ui.m_btnBack.onClick.Add(this.OnHide);
  26. }
  27. protected override void OnShown()
  28. {
  29. base.OnShown();
  30. NoticeInfo noticeInfo = this.viewData as NoticeInfo;
  31. _ui.m_txtTitle.text = noticeInfo.title;
  32. _ui.m_ComContent.m_txtContent.text = noticeInfo.content;
  33. }
  34. protected override void OnHide()
  35. {
  36. base.OnHide();
  37. ViewManager.GoBackFrom(typeof(NoticeSystemShowView).Name);
  38. }
  39. }
  40. }