From 6eb915c129fc90c6f4c82ae097dd6ffad5239efc Mon Sep 17 00:00:00 2001 From: chai Date: Mon, 25 Jan 2021 14:28:30 +0800 Subject: +scripts --- .../XMainClient/UI/XGuildMemberInfoDisplay.cs | 176 +++++++++++++++++++++ 1 file changed, 176 insertions(+) create mode 100644 Client/Assets/Scripts/XMainClient/UI/XGuildMemberInfoDisplay.cs (limited to 'Client/Assets/Scripts/XMainClient/UI/XGuildMemberInfoDisplay.cs') diff --git a/Client/Assets/Scripts/XMainClient/UI/XGuildMemberInfoDisplay.cs b/Client/Assets/Scripts/XMainClient/UI/XGuildMemberInfoDisplay.cs new file mode 100644 index 00000000..4262aa63 --- /dev/null +++ b/Client/Assets/Scripts/XMainClient/UI/XGuildMemberInfoDisplay.cs @@ -0,0 +1,176 @@ +using System; +using UILib; +using UnityEngine; +using XUtliPoolLib; + +namespace XMainClient.UI +{ + internal class XGuildMemberInfoDisplay + { + public Transform Root; + + public IXUILabelSymbol Name; + + public IXUILabel Position; + + public IXUILabel Level; + + public IXUILabel PPT; + + public IXUISprite Portrait; + + public IXUISprite Profession; + + public IXUILabel Liveness; + + public IXUISpriteAnimation Title; + + public void Init(Transform go, bool bFirstInit) + { + this.Root = go; + Transform transform = this.Root.Find("Name"); + bool flag = transform != null; + if (flag) + { + this.Name = (transform.GetComponent("XUILabelSymbol") as IXUILabelSymbol); + if (bFirstInit) + { + this.Name.InputText = ""; + } + } + else + { + this.Name = null; + } + transform = this.Root.Find("Position"); + bool flag2 = transform != null; + if (flag2) + { + this.Position = (transform.GetComponent("XUILabel") as IXUILabel); + if (bFirstInit) + { + this.Position.SetText(""); + } + } + else + { + this.Position = null; + } + transform = this.Root.Find("Level"); + bool flag3 = transform != null; + if (flag3) + { + this.Level = (transform.GetComponent("XUILabel") as IXUILabel); + if (bFirstInit) + { + this.Level.SetText(""); + } + } + else + { + this.Level = null; + } + transform = this.Root.Find("PPT"); + bool flag4 = transform != null; + if (flag4) + { + this.PPT = (transform.GetComponent("XUILabel") as IXUILabel); + if (bFirstInit) + { + this.PPT.SetText(""); + } + } + else + { + this.PPT = null; + } + transform = this.Root.Find("Portrait"); + bool flag5 = transform != null; + if (flag5) + { + this.Portrait = (transform.GetComponent("XUISprite") as IXUISprite); + } + else + { + this.Portrait = null; + } + transform = this.Root.Find("Profession"); + bool flag6 = transform != null; + if (flag6) + { + this.Profession = (transform.GetComponent("XUISprite") as IXUISprite); + } + else + { + this.Profession = null; + } + transform = this.Root.Find("Liveness"); + bool flag7 = transform != null; + if (flag7) + { + this.Liveness = (transform.GetComponent("XUILabel") as IXUILabel); + if (bFirstInit) + { + this.Liveness.SetText(string.Empty); + } + } + transform = this.Root.Find("Title"); + bool flag8 = transform != null; + if (flag8) + { + this.Title = (transform.GetComponent("XUISpriteAnimation") as IXUISpriteAnimation); + } + } + + public void Set(XGuildMemberBasicInfo data) + { + bool flag = this.Name != null; + if (flag) + { + this.Name.InputText = data.name + XWelfareDocument.GetMemberPrivilegeIconString(data.paymemberid) + XRechargeDocument.GetVIPIconString(data.vip); + } + bool flag2 = this.Position != null; + if (flag2) + { + this.Position.SetText(XGuildDocument.GuildPP.GetPositionName(data.position, false)); + } + bool flag3 = this.Level != null; + if (flag3) + { + this.Level.SetText("Lv." + data.level); + } + bool flag4 = this.PPT != null; + if (flag4) + { + this.PPT.SetText(data.ppt.ToString()); + } + bool flag5 = this.Portrait != null; + if (flag5) + { + this.Portrait.SetSprite(XSingleton.singleton.GetProfHeadIcon2(data.profession)); + } + bool flag6 = this.Profession != null; + if (flag6) + { + this.Profession.SetSprite(XSingleton.singleton.GetProfIcon(data.profession)); + } + bool flag7 = this.Liveness != null; + if (flag7) + { + this.Liveness.SetText(data.GetLiveness()); + } + bool flag8 = this.Title != null; + if (flag8) + { + TitleTable.RowData title = XTitleDocument.GetTitle(data.titleID); + bool flag9 = title != null; + if (flag9) + { + this.Title.SetNamePrefix(title.RankAtlas, title.RankIcon); + this.Title.SetFrameRate(XTitleDocument.TITLE_FRAME_RATE); + this.Title.MakePixelPerfect(); + } + } + } + } +} -- cgit v1.1-26-g67d0