コード例 #1
0
        protected override bool DoApply(UITheme theme)
        {
            if (Text == null)
            {
                return(false);
            }

            Color value = theme.GetColorValue(this.ColorType);

            if (!this.KeepAlphaValue)
            {
                // Override the alpha value with the current value of the font
                value = new Color(value.r, value.g, value.b, this.Text.color.a);
            }

            if (this.Text.color == value)
            {
                return(false);
            }

            this.Text.color = value;
            return(true);
        }