summaryrefslogtreecommitdiff
path: root/Client/Assets/Scripts/XMainClient/XAnnouncementView.cs
blob: 25c5a0be585e250cd4c788b301d324908385b234 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
using System;
using UILib;
using XMainClient.UI.UICommon;

namespace XMainClient
{
	internal class XAnnouncementView : DlgBase<XAnnouncementView, XAnnouncementBehaviour>
	{
		public override string fileName
		{
			get
			{
				return "SelectChar/AnnouncementDlg";
			}
		}

		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;
			}
		}

		public override void RegisterEvent()
		{
			base.RegisterEvent();
			base.uiBehaviour.m_Enter.RegisterClickEventHandler(new ButtonClickEventHandler(this.OnEnterClicked));
		}

		private bool OnEnterClicked(IXUIButton button)
		{
			this.SetVisibleWithAnimation(false, null);
			return true;
		}

		public void ShowAnnouncement(string announcement)
		{
			this.SetVisibleWithAnimation(true, null);
			base.uiBehaviour.m_Announcement.SetText(announcement);
		}
	}
}