SystemNoticeView.cs 1.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. using FairyGUI;
  2. using UI.Login;
  3. namespace GFGGame
  4. {
  5. public class SystemNoticeView : BaseWindow
  6. {
  7. private UI_NoticeUI _ui;
  8. public override void Dispose()
  9. {
  10. if (_ui != null)
  11. {
  12. _ui.Dispose();
  13. _ui = null;
  14. }
  15. base.Dispose();
  16. }
  17. protected override void OnInit()
  18. {
  19. base.OnInit();
  20. packageName = UI_NoticeUI.PACKAGE_NAME;
  21. _ui = UI_NoticeUI.Create();
  22. this.viewCom = _ui.target;
  23. this.viewCom.Center();
  24. this.modal = true;
  25. }
  26. protected override void OnShown()
  27. {
  28. base.OnShown();
  29. string title = (this.viewData as object[])[0].ToString();
  30. string content = (this.viewData as object[])[1].ToString();
  31. _ui.m_txtTitle.text = title;
  32. _ui.m_comContent.m_txtContent.text = content;
  33. }
  34. protected override void OnHide()
  35. {
  36. base.OnHide();
  37. }
  38. }
  39. }