public override void PopulateMemberInfo(CommunityMember member)
        {
            this.m_characterName.text  = member.Name;
            this.m_classImage.sprite   = GeneralHelpers.LoadClassIcon(member.Class);
            this.m_memberInfo          = member;
            this.m_classImage.color    = ((this.m_memberInfo.Presence != 1 && this.m_memberInfo.Presence != 2) ? CommunityRosterItem.OfflineColor : CommunityRosterItem.OnlineColor);
            this.m_characterName.color = ((this.m_memberInfo.Presence != 1 && this.m_memberInfo.Presence != 2) ? CommunityRosterItem.OfflineColor : CommunityRosterItem.OnlineColor);
            MeshGradient component = this.m_characterName.gameObject.GetComponent <MeshGradient>();

            if (component != null)
            {
                component.enabled = (this.m_memberInfo.Presence == 1);
            }
            if (this.m_ringIcon != null)
            {
                this.m_ringIcon.color = ((this.m_memberInfo.Presence != 1 && this.m_memberInfo.Presence != 2) ? CommunityRosterItem.OfflineColor : CommunityRosterItem.OnlineColor);
            }
            if (this.m_ownerIcon != null)
            {
                this.m_ownerIcon.gameObject.SetActive(this.m_memberInfo.Role == 1 || this.m_memberInfo.Role == 2);
            }
            if (this.m_moderatorIcon != null)
            {
                this.m_moderatorIcon.gameObject.SetActive(this.m_memberInfo.Role == 3);
            }
        }
Exemplo n.º 2
0
        private void Awake()
        {
            this.m_spammingToggle.onValueChanged.AddListener(delegate
            {
                this.AssignReason(this.m_spammingToggle, this.REPORT_SPAM_STRING);
            });
            this.m_nameToggle.onValueChanged.AddListener(delegate
            {
                this.AssignReason(this.m_nameToggle, this.REPORT_PLAYERNAME_STRING);
            });
            this.m_languageToggle.onValueChanged.AddListener(delegate
            {
                this.AssignReason(this.m_languageToggle, this.REPORT_LANGUAGE_STRING);
            });
            this.m_cheatingToggle.onValueChanged.AddListener(delegate
            {
                this.AssignReason(this.m_cheatingToggle, this.REPORT_CHEATING_STRING);
            });
            Image component = this.m_reportPlayerButton.GetComponent <Image>();

            component.material = new Material(this.m_grayscaleShader);
            component.material.SetFloat("_GrayscaleAmount", 1f);
            Text componentInChildren = this.m_reportPlayerButton.GetComponentInChildren <Text>();

            componentInChildren.color = Color.gray;
            MeshGradient component2 = componentInChildren.GetComponent <MeshGradient>();

            component2.enabled = false;
            Button component3 = this.m_reportPlayerButton.GetComponent <Button>();

            component3.interactable = false;
        }
Exemplo n.º 3
0
        private void EnableReportButton()
        {
            Image component = this.m_reportPlayerButton.GetComponent <Image>();

            component.material.SetFloat("_GrayscaleAmount", 0f);
            Text componentInChildren = this.m_reportPlayerButton.GetComponentInChildren <Text>();

            componentInChildren.color = this.ACTIVE_TEXT_COLOR;
            MeshGradient component2 = componentInChildren.GetComponent <MeshGradient>();

            component2.enabled = true;
            Button component3 = this.m_reportPlayerButton.GetComponent <Button>();

            component3.interactable = true;
        }