123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263 |
- using UnityEngine;
- using FairyGUI;
- using UI.Notice;
- namespace GFGGame
- {
- public class NoticeSystemShowView : BaseWindow
- {
- private UI_NoticeSystemShowUI _ui;
- public override void Dispose()
- {
- if (_ui != null)
- {
- _ui.Dispose();
- _ui = null;
- }
- base.Dispose();
- }
- protected override void Init()
- {
- base.Init();
- packageName = UI_NoticeSystemShowUI.PACKAGE_NAME;
- _ui = UI_NoticeSystemShowUI.Create();
- this.viewCom = _ui.target;
- isfullScreen = true;
- this.clickBlankToClose = false;
- // this.modal = true;
- // viewAnimationType = EnumViewAnimationType.None;
- }
- protected override void OnInit()
- {
- base.OnInit();
- _ui.m_btnBack.onClick.Add(GoBackFrom);
- _ui.m_btnBg.onClick.Add(GoBackFrom);
- }
- protected override void OnShown()
- {
- base.OnShown();
- NoticeInfo noticeInfo = this.viewData as NoticeInfo;
- _ui.m_txtTitle.text = noticeInfo.title;
- _ui.m_ComContent.m_txtContent.text = noticeInfo.content;
- _ui.m_ComContent.target.scrollPane.ScrollTop();
- }
- protected override void OnHide()
- {
- base.OnHide();
- }
- private void GoBackFrom()
- {
- EventAgent.DispatchEvent(ConstMessage.SHOW_SYSTEM_NOTICE);
- //ViewManager.GoBackFrom(typeof(NoticeSystemShowView).Name);
- //ViewManager.Show<NoticeView>(null,false, false);
- Hide();
- }
- }
- }
|