summaryrefslogtreecommitdiff
path: root/Client/Assets/Scripts/XMainClient/XPatfaceView.cs
diff options
context:
space:
mode:
authorchai <chaifix@163.com>2021-01-25 14:28:30 +0800
committerchai <chaifix@163.com>2021-01-25 14:28:30 +0800
commit6eb915c129fc90c6f4c82ae097dd6ffad5239efc (patch)
tree7dd2be50edf41f36b60fac84696e731c13afe617 /Client/Assets/Scripts/XMainClient/XPatfaceView.cs
+scripts
Diffstat (limited to 'Client/Assets/Scripts/XMainClient/XPatfaceView.cs')
-rw-r--r--Client/Assets/Scripts/XMainClient/XPatfaceView.cs102
1 files changed, 102 insertions, 0 deletions
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<XPatfaceView, XPatfaceBehaviour>
+ {
+ 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>(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>(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<XUICacheImage>.singleton.Load(this.doc.NoticeList[i].content, base.uiBehaviour.m_Pic, base.uiBehaviour);
+ base.uiBehaviour.m_OK.ID = (ulong)i;
+ return;
+ }
+ }
+ XSingleton<XPandoraSDKDocument>.singleton.CheckPandoraPLPanel();
+ this.SetVisible(false, true);
+ }
+ }
+ }
+}