TypogenicText.Set C# (CSharp) Метод

Set() публичный Метод

public Set ( string text = null, float size = null, float leading = null, float tracking = null, float paragraphSpacing = null, TTextAlignment alignement = null, float wordWrap = null ) : void
text string
size float
leading float
tracking float
paragraphSpacing float
alignement TTextAlignment
wordWrap float
Результат void
    public void Set(string text = null, float? size = null, float? leading = null, float? tracking = null, float? paragraphSpacing = null, TTextAlignment? alignement = null, float? wordWrap = null)
    {
        Text = text ?? Text;
        Size = size ?? Size;
        Leading = leading ?? Leading;
        Tracking = tracking ?? Tracking;
        ParagraphSpacing = paragraphSpacing ?? ParagraphSpacing;
        Alignment = alignement ?? Alignment;
        WordWrap = wordWrap ?? WordWrap;
    }

Usage Example

Пример #1
0
        void HealthChanged()
        {
            Color c;

            if (meState.health <= 25)
            {
                c = Color.red;
            }
            else if (meState.health <= 50)
            {
                c = new Color(1f, 0.5f, 36f / 255f);
            }
            else if (meState.health <= 75)
            {
                c = Color.yellow;
            }
            else
            {
                c = Color.green;
            }

            text.ColorBottomLeft           =
                text.ColorBottomRight      =
                    text.ColorTopLeft      =
                        text.ColorTopRight =
                            c;

            text.Set("HP " + meState.health);
        }
All Usage Examples Of TypogenicText::Set