From 6eb915c129fc90c6f4c82ae097dd6ffad5239efc Mon Sep 17 00:00:00 2001 From: chai Date: Mon, 25 Jan 2021 14:28:30 +0800 Subject: +scripts --- Client/Assets/Scripts/XMainClient/XPatfaceView.cs | 102 ++++++++++++++++++++++ 1 file changed, 102 insertions(+) create mode 100644 Client/Assets/Scripts/XMainClient/XPatfaceView.cs (limited to 'Client/Assets/Scripts/XMainClient/XPatfaceView.cs') diff --git a/Client/Assets/Scripts/XMainClient/XPatfaceView.cs b/Client/Assets/Scripts/XMainClient/XPatfaceView.cs new file mode 100644 index 00000000..90804ec7 --- /dev/null +++ b/Client/Assets/Scripts/XMainClient/XPatfaceView.cs @@ -0,0 +1,102 @@ +using System; +using UILib; +using XMainClient.UI.UICommon; +using XUtliPoolLib; + +namespace XMainClient +{ + internal class XPatfaceView : DlgBase + { + public override string fileName + { + get + { + return "Hall/PatfaceDlg"; + } + } + + public override int group + { + get + { + return 1; + } + } + + public override bool autoload + { + get + { + return true; + } + } + + public override bool isMainUI + { + get + { + return true; + } + } + + public override bool pushstack + { + get + { + return true; + } + } + + private XAnnouncementDocument doc; + + public bool bShow = false; + + protected override void Init() + { + base.Init(); + this.doc = XDocuments.GetSpecificDocument(XAnnouncementDocument.uuID); + } + + protected override void OnHide() + { + base.OnHide(); + base.uiBehaviour.m_Pic.SetTexturePath(""); + } + + public override void RegisterEvent() + { + base.RegisterEvent(); + base.uiBehaviour.m_OK.RegisterClickEventHandler(new ButtonClickEventHandler(this.OnEnterClicked)); + } + + private bool OnEnterClicked(IXUIButton button) + { + this.bShow = true; + this.doc.SendClickNotice(this.doc.NoticeList[(int)button.ID]); + return true; + } + + public void ShowPatface() + { + bool flag = !this.bShow; + if (!flag) + { + this.bShow = false; + this.doc = XDocuments.GetSpecificDocument(XAnnouncementDocument.uuID); + for (int i = 0; i < this.doc.NoticeList.Count; i++) + { + bool flag2 = this.doc.NoticeList[i].type != 5u || !this.doc.NoticeList[i].isnew; + if (!flag2) + { + this.SetVisible(true, true); + XSingleton.singleton.Load(this.doc.NoticeList[i].content, base.uiBehaviour.m_Pic, base.uiBehaviour); + base.uiBehaviour.m_OK.ID = (ulong)i; + return; + } + } + XSingleton.singleton.CheckPandoraPLPanel(); + this.SetVisible(false, true); + } + } + } +} -- cgit v1.1-26-g67d0