public UIUnionBar(SimplifiedUnionInfo info) { unionInfo = info; this.dividerTexture = TextureManager.Load("Images/UI/Divider"); this.Width.Set(0, 1f); this.Height.Set(100f, 0f); this.CornerSize = new Vector2(8, 8); base.MainTexture = ServerSideCharacter2.ModTexturesTable["Box"]; base.SetPadding(6f); this.OverflowHidden = true; nameLabel = new UIText(unionInfo.Name); nameLabel.Top.Set(10, 0f); nameLabel.Left.Set(5, 0); Append(nameLabel); levelText = new UIText(""); levelText.Top.Set(10f, 0f); levelText.Left.Set(-220f, 1f); levelText.SetText($"等级:{info.Level}"); Append(levelText); var memberNumText = new UIText(""); memberNumText.Top.Set(10f, 0f); memberNumText.Left.Set(-120f, 1f); memberNumText.SetText($"人数:{info.NumMember} / {Union.GetMaxMembers(info.Level)}"); Append(memberNumText); var ownerText = new UIText(""); ownerText.Top.Set(60f, 0f); ownerText.Left.Set(-220f, 1f); ownerText.SetText($"会长:{info.OwnerName}"); Append(ownerText); AddExtraButtons(extraButtons); SetUpExtraButtons(); }