public void UpdateStatus(bool enable)
 {
     isEnabled = enable;
     SelectedLineImage.GetComponent <Image>().enabled = isEnabled;
     FilterText.color = isEnabled ?
                        ThemeHelper.GetThemeHighlightColor(this.Theme) :
                        ThemeHelper.GetThemeBaseFontColor(this.Theme);
 }
 public void UpdateStatus(bool enable)
 {
     isEnabled = enable;
     SelectedLineImage.GetComponent <Image>().enabled = isEnabled;
     FilterText.color = isEnabled ?
                        ThemeHelper.GetThemeHighlightColor(this.Theme) :
                        ThemeHelper.GetThemeBaseFontColor(this.Theme);
     this.SelectedLineImage.sprite = ThemeHelper.LoadSprite(this.Theme, "RowBackground-Highlighted");
 }
Exemple #3
0
        public IEnumerator Reload()
        {
            yield return(null);

            var    fontColor            = this.IsHighlighted? Color.white: ThemeHelper.GetThemeProfileFontColor(this.Theme);
            Sprite backgroundImageToUse = null;

            if (!IsHighlighted)
            {
                backgroundImageToUse = ThemeHelper.LoadSprite(this.Theme, this.BackgroundColor.ToString());
                switch (this.Theme)
                {
                case Theme.Light: this.GamerPicMask.color = lightThemeBackgroundColors[(int)this.BackgroundColor]; break;

                case Theme.Dark: this.GamerPicMask.color = darkThemeBackgroundColors[(int)this.BackgroundColor]; break;
                }
            }
            else
            {
                backgroundImageToUse    = ThemeHelper.LoadSprite(this.Theme, "RowBackground-Highlighted");
                this.GamerPicMask.color = ThemeHelper.GetThemeHighlightColor(this.Theme);
            }

            if (IsCurrentPlayer)
            {
                this.CurrentPlayerIndicator.enabled = true;
                this.CurrentPlayerIndicator.sprite  = ThemeHelper.LoadSprite(this.Theme, "HereMarker");
            }
            else
            {
                this.CurrentPlayerIndicator.enabled = false;
            }

            this.GamerTagText.color = fontColor;
            this.ScoreText.color    = fontColor;
            this.RankText.color     = fontColor;

            this.ProfileBackgroundImage.sprite = backgroundImageToUse;
            this.RankBackgroundImage.sprite    = backgroundImageToUse;
            this.ScoreBackgroundImage.sprite   = backgroundImageToUse;

            this.RankBackgroundImage.enabled  = this.ShowRank;
            this.RankText.enabled             = this.ShowRank;
            this.ScoreBackgroundImage.enabled = this.ShowScore;
            this.ScoreText.enabled            = this.ShowScore;

            this.ProfileBackgroundImage.enabled = true;
            this.GamerPicMask.enabled           = true;
            this.GamerPicImage.enabled          = true;
            this.GamerTagText.enabled           = true;
        }
        private IEnumerator LoadTheme(Theme theme)
        {
            yield return(null);

            this.HeaderRowImage.sprite = ThemeHelper.LoadSprite(this.Theme, "LabelRowBackground");
            this.BackgroundImage.color = ThemeHelper.GetThemeBackgroundColor(this.Theme);
            var fontColor = ThemeHelper.GetThemeBaseFontColor(this.Theme);

            this.HeaderText.color       = fontColor;
            this.pageText.color         = ThemeHelper.GetThemeHighlightColor(this.Theme);
            this.NextPageText.color     = fontColor;
            this.PreviousPageText.color = fontColor;
            var lineSprite = ThemeHelper.LoadSprite(this.Theme, "Line");

            this.BottomLine.sprite = lineSprite;
            this.TopLine.sprite    = lineSprite;
        }