blob: 1365eedd8c52171d705e09a489c92b82f36ee532 (
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
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
|
using System;
using UILib;
using UnityEngine;
using XUtliPoolLib;
namespace XMainClient
{
internal class GuildRelaxChildHandler : DlgHandlerBase, IGuildRelexChildInterface
{
public int ModuleID
{
get
{
return this.m_moduleID;
}
}
protected IXUILabel m_title;
protected IXUITexture m_bg;
protected IXUILabel m_tip;
protected GameObject m_qa;
protected GameObject m_redPoint;
protected int m_moduleID;
protected override void Init()
{
base.Init();
this.m_title = (base.transform.Find("Title/Text").GetComponent("XUILabel") as IXUILabel);
this.m_bg = (base.transform.Find("Bg").GetComponent("XUITexture") as IXUITexture);
this.m_tip = (base.transform.Find("Tip").GetComponent("XUILabel") as IXUILabel);
this.m_qa = base.transform.Find("QA").gameObject;
this.m_redPoint = base.transform.Find("Title/RedPoint").gameObject;
this.m_tip.SetVisible(false);
this.m_qa.SetActive(false);
}
protected override void OnShow()
{
base.OnShow();
this.RefreshData();
this.RefreshRedPoint();
}
public override void StackRefresh()
{
base.StackRefresh();
this.RefreshData();
this.RefreshRedPoint();
}
public override void RegisterEvent()
{
base.RegisterEvent();
this.m_bg.RegisterLabelClickEventHandler(new TextureClickEventHandler(this.OnGameClick));
}
public override void OnUnload()
{
this.m_bg.SetTexturePath("");
base.OnUnload();
}
public virtual void SetGuildRelex(XSysDefine define)
{
this.m_moduleID = XFastEnumIntEqualityComparer<XSysDefine>.ToInt(define);
GuildRelaxGameList.RowData byModuleID = XGuildRelaxGameDocument.GameList.GetByModuleID(this.m_moduleID);
this.m_bg.SetTexturePath(string.Format("atlas/UI/Social/{0}", byModuleID.GameBg));
this.m_title.SetText(byModuleID.GameName);
}
public virtual void SetUnLockLevel()
{
}
protected virtual void OnGameClick(IXUITexture sp)
{
}
public override void RefreshData()
{
XGuildDocument specificDocument = XDocuments.GetSpecificDocument<XGuildDocument>(XGuildDocument.uuID);
uint unlockLevel = XGuildDocument.GuildConfig.GetUnlockLevel((XSysDefine)this.m_moduleID);
this.m_bg.ID = (ulong)((long)this.m_moduleID);
bool flag = unlockLevel <= specificDocument.Level;
if (flag)
{
this.m_bg.RegisterLabelClickEventHandler(new TextureClickEventHandler(this.OnGameClick));
this.SetUnLockLevel();
}
else
{
this.m_qa.SetActive(false);
this.m_tip.SetVisible(true);
this.m_bg.RegisterLabelClickEventHandler(null);
this.m_tip.SetText(XStringDefineProxy.GetString("OPEN_AT_GUILD_LEVEL", new object[]
{
unlockLevel
}));
}
}
public virtual void RefreshRedPoint()
{
}
}
}
|