// Token: 0x0600603C RID: 24636 RVA: 0x0021E20C File Offset: 0x0021C60C private void SetupBlockButton() { VRCUiButton vrcuiButton = (from b in base.GetComponentsInChildren <VRCUiButton>() where b.Name == "Block" select b).FirstOrDefault <VRCUiButton>(); if (vrcuiButton != null) { if (!Player.Instance.isValidUser || this.isModerator || this.user.id == User.CurrentUser.id || this.user.developerType == APIUser.DeveloperType.Internal) { vrcuiButton.SetButtonText("Block"); vrcuiButton.GetComponent <Button>().interactable = false; } else { vrcuiButton.GetComponent <Button>().interactable = true; if (ModerationManager.Instance.IsBlocked(this.user.id)) { vrcuiButton.SetButtonText("Unblock"); } else { vrcuiButton.SetButtonText("Block"); } } } }
// Token: 0x0600603B RID: 24635 RVA: 0x0021E10C File Offset: 0x0021C50C private void SetupMuteButton() { VRCUiButton vrcuiButton = (from b in base.GetComponentsInChildren <VRCUiButton>() where b.Name == "Mute" select b).FirstOrDefault <VRCUiButton>(); if (vrcuiButton != null) { if (this.user.developerType == null || this.user.developerType == APIUser.DeveloperType.Internal || this.user.id == User.CurrentUser.id) { vrcuiButton.SetButtonText("Mute"); vrcuiButton.GetComponent <Button>().interactable = false; } else { vrcuiButton.GetComponent <Button>().interactable = true; if (ModerationManager.Instance.IsMuted(this.user.id)) { vrcuiButton.SetButtonText("Unmute"); } else { vrcuiButton.SetButtonText("Mute"); } } } }
// Token: 0x06006040 RID: 24640 RVA: 0x0021E430 File Offset: 0x0021C830 private void SetupFriendButton(string text) { VRCUiButton vrcuiButton = (from b in base.GetComponentsInChildren <VRCUiButton>() where b.Name == "Friend" select b).FirstOrDefault <VRCUiButton>(); if (vrcuiButton != null) { if (this.user.id == User.CurrentUser.id || ModerationManager.Instance.IsBlockedEitherWay(this.user.id)) { vrcuiButton.GetComponent <Button>().interactable = false; } else { vrcuiButton.GetComponent <Button>().interactable = true; } vrcuiButton.SetButtonText(text); } }
// Token: 0x06006041 RID: 24641 RVA: 0x0021E4D4 File Offset: 0x0021C8D4 private void SetupVoteToKickButton() { VRCUiButton vrcuiButton = (from b in base.GetComponentsInChildren <VRCUiButton>() where b.Name == "VoteKick" select b).FirstOrDefault <VRCUiButton>(); if (vrcuiButton == null) { return; } if (User.CurrentUser.id == this.user.id || PlayerManager.GetPlayer(this.user.id) == null) { vrcuiButton.GetComponent <Button>().interactable = false; } else { vrcuiButton.GetComponent <Button>().interactable = true; vrcuiButton.SetButtonText("Vote to Kick"); } }
// Token: 0x0600603F RID: 24639 RVA: 0x0021E3C8 File Offset: 0x0021C7C8 private void SetupInviteButton(string text, bool active) { VRCUiButton vrcuiButton = (from b in base.GetComponentsInChildren <VRCUiButton>() where b.Name == "Invite" select b).FirstOrDefault <VRCUiButton>(); if (vrcuiButton != null) { Button component = vrcuiButton.GetComponent <Button>(); if (component != null) { vrcuiButton.SetButtonText(text); component.interactable = active; } } }
Button GetInviteButton(PageUserInfo pageUserInfo) { if (m_inviteButton == null) { List <VRCUiButton> componentsInChildren = pageUserInfo.GetComponentsInChildren <VRCUiButton>().ToList(); VRCUiButton vrcuiButton = componentsInChildren.Where((button, val) => button.GetComponentInChildren <Button>().GetComponentInChildren <Text>().text == "Invite" || button.GetComponentInChildren <Button>().GetComponentInChildren <Text>().text == "Invite Sent" ).FirstOrDefault <VRCUiButton>(); m_inviteButton = vrcuiButton.GetComponent <Button>(); } return(m_inviteButton); }