summaryrefslogtreecommitdiff
path: root/Client/Assets/Scripts/XMainClient/UI/GuildScoreInfo.cs
blob: 57ec0f12396220cfbde5b8d20ae7f8a90b8fc20d (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
using System;
using UILib;
using UnityEngine;

namespace XMainClient.UI
{
	internal class GuildScoreInfo
	{
		public int Index
		{
			get
			{
				return this.m_index;
			}
		}

		private Transform m_transform;

		private IXUILabel m_Score;

		private IXUILabel m_Value;

		private IXUIButton m_Go;

		private int m_index;

		public void Init(Transform t, int index)
		{
			this.m_transform = t;
			this.m_index = index;
			this.m_Score = (t.Find("Score").GetComponent("XUILabel") as IXUILabel);
			this.m_Value = (t.Find("Value").GetComponent("XUILabel") as IXUILabel);
			this.m_Go = (t.Find("Go").GetComponent("XUIButton") as IXUIButton);
			this.m_Go.ID = (ulong)((long)this.m_index);
		}

		public void SetInfo(uint score, uint value)
		{
			this.m_Score.SetText(score.ToString());
			this.m_Value.SetText(value.ToString());
		}

		public void RegisterClickEventHandler(ButtonClickEventHandler click)
		{
			this.m_Go.RegisterClickEventHandler(click);
		}

		public void Destroy()
		{
			this.m_Go.RegisterClickEventHandler(null);
		}
	}
}