public void AddUserLabel(NodeAddedEvent e, FriendUINode friendUI) { GameObject userLabelInstance = UserLabelBuilder.CreateDefaultLabel(); UserLabelBuilder builder = new UserLabelBuilder(friendUI.userGroup.Key, userLabelInstance, null, false); builder.SubscribeClick().Build().transform.SetParent(friendUI.inviteFriendListItem.UserLabelContainer.transform, false); }
public void AddTeammate(long id, string avatarId, int rank) { foreach (UserLabelComponent component in this.teammatesList.GetComponentsInChildren <UserLabelComponent>(true)) { if (component.UserId == id) { return; } } UserLabelBuilder builder = new UserLabelBuilder(id, Instantiate <GameObject>(this.teammate.gameObject), avatarId, false); builder.SetLeague(rank); GameObject obj2 = builder.Build(); obj2.transform.SetParent(this.teammatesList, false); obj2.gameObject.SetActive(true); }
public void SetUserLabel(NodeAddedEvent e, UserNode user, [Context, JoinByUser] UserLabelIndicatorNode userLabelIndicator, [JoinByScoreTable] ScoreTableNode scoreTable) { GameObject userLabel = userLabelIndicator.scoreTableUserLabelIndicator.userLabel; bool premium = user.Entity.HasComponent <PremiumAccountBoostComponent>(); UserLabelBuilder builder = new UserLabelBuilder(user.Entity.Id, userLabel, user.userAvatar.Id, premium); LeagueNode node = base.Select <LeagueNode>(user.Entity, typeof(LeagueGroupComponent)).FirstOrDefault <LeagueNode>(); if (node != null) { builder.SetLeague(node.leagueConfig.LeagueIndex); } builder.SkipLoadUserFromServer(); if (scoreTable.scoreTableUserAvatar.EnableShowUserProfileOnAvatarClick) { builder.SubscribeAvatarClick(); } builder.Build(); }
private void Init() { this.SetNotReady(); if (this.Empty) { this.userSearchingText.SetActive(this.showSearchingText); this.userInfo.SetActive(false); } else { if (!this.userEntity.HasComponent <LobbyUserListItemComponent>()) { this.userEntity.AddComponent(this); } if (!this.userEntity.HasComponent <UserSquadColorComponent>()) { UserSquadColorComponent component = base.GetComponent <UserSquadColorComponent>(); this.userEntity.AddComponent(component); } if (this.userLabelInstance != null) { Destroy(this.userLabelInstance); } this.userLabelInstance = Instantiate <GameObject>(this.userLabelPrefab); bool premium = this.userEntity.HasComponent <PremiumAccountBoostComponent>(); UserLabelBuilder builder = new UserLabelBuilder(this.userEntity.Id, this.userLabelInstance, this.userEntity.GetComponent <UserAvatarComponent>().Id, premium); this.userLabelInstance = builder.SkipLoadUserFromServer().Build(); this.userLabelInstance.transform.SetParent(this.turretName.transform.parent, false); this.userLabelInstance.transform.SetSiblingIndex(0); } bool flag2 = !this.Empty && !this.selfUser; if (this.buttonScript != null) { this.buttonScript.interactable = flag2; } RightMouseButtonClickSender sender = base.GetComponent <RightMouseButtonClickSender>(); if ((sender != null) && !flag2) { sender.enabled = false; } }
public void Awake() { this.userLabel = UserLabelBuilder.CreateDefaultLabel(); this.userLabel.transform.SetParent(base.gameObject.transform, false); }