12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061 |
- 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()
- {
- ViewManager.GoBackFrom(typeof(NoticeSystemShowView).Name);
- ViewManager.Show<NoticeView>();
- }
- }
- }
|