public static Sprite GetXboxButtonSpite(Theme theme, XboxControllerButtons xboxButton) { var iconName = string.Empty; switch (xboxButton) { case XboxControllerButtons.A: case XboxControllerButtons.B: case XboxControllerButtons.X: case XboxControllerButtons.Y: iconName = iconName + xboxButton; break; case XboxControllerButtons.LeftBumper: iconName = "LB"; break; case XboxControllerButtons.RightBumper: iconName = "RB"; break; default: iconName = string.Empty; break; } if (string.IsNullOrEmpty(iconName)) { return(null); } else { return(ThemeHelper.LoadSprite(theme, "Controller/" + iconName)); } }
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"); }
private IEnumerator LoadTheme() { yield return(null); var backgroundColor = ThemeHelper.GetThemeBackgroundColor(this.Theme); this.profileInfoPanelImage.color = backgroundColor; this.gamerpicMask.color = backgroundColor; this.signInPanelImage.sprite = ThemeHelper.LoadSprite(this.Theme, "RowBackground-Highlighted"); this.gamertag.color = ThemeHelper.GetThemeBaseFontColor(this.Theme); }
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; }
public void Start() { this.SelectedLineImage.sprite = ThemeHelper.LoadSprite(this.Theme, "RowBackground-Highlighted"); }