protected virtual void OnLocked() { backgroundImage.color = stylesheet.GetValue <Color>(lockedColorPreset); foregroundImage.sprite = stylesheet.GetValue <Sprite>(lockSpritePreset); foregroundImage.color = stylesheet.GetValue <Color>(lockColorPreset); text.text = ""; }
private Color GetTextColor() { IStylesheet stylesheet = Main.StaticData.UI.Stylesheet; Color result = stylesheet.GetValue <Color>(textColorPreset); result.a *= alphaMultiplier; return(result); }
protected override void LoadDataInternal() { IStylesheet stylesheet = Main.StaticData.UI.Stylesheet; int i = 0; Text text = gameObject.GetComponent <Text>(); if (text != null) { text.fontSize = (int)stylesheet.GetValue <float>(fontSizePreset); text.color = GetTextColor(); } TMPro.TextMeshProUGUI tmpText = gameObject.GetComponent <TMPro.TextMeshProUGUI>(); if (tmpText != null) { tmpText.fontSize = stylesheet.GetValue <float>(fontSizePreset); tmpText.color = GetTextColor(); } }