예제 #1
0
    // Token: 0x0600472C RID: 18220 RVA: 0x0010D1C8 File Offset: 0x0010B3C8
    protected override void _PerformLayoutImpl(global::dfMarkupBox container, global::dfMarkupStyle style)
    {
        style.TextDecoration = global::dfMarkupTextDecoration.Underline;
        style = base.applyTextStyleAttributes(style);
        int i = 0;

        while (i < base.ChildNodes.Count)
        {
            global::dfMarkupElement dfMarkupElement = base.ChildNodes[i];
            if (!(dfMarkupElement is global::dfMarkupString))
            {
                goto IL_63;
            }
            global::dfMarkupString dfMarkupString = dfMarkupElement as global::dfMarkupString;
            if (!(dfMarkupString.Text == "\n"))
            {
                goto IL_63;
            }
            if (style.PreserveWhitespace)
            {
                container.AddLineBreak();
            }
IL_6B:
            i++;
            continue;
IL_63:
            dfMarkupElement.PerformLayout(container, style);
            goto IL_6B;
        }
    }
    // Token: 0x0600478D RID: 18317 RVA: 0x0010EB10 File Offset: 0x0010CD10
    private void processMarkup()
    {
        this.releaseMarkupReferences();
        this.elements = global::dfMarkupParser.Parse(this, this.text);
        float textScaleMultiplier = this.getTextScaleMultiplier();
        int   num                   = Mathf.CeilToInt((float)this.FontSize * textScaleMultiplier);
        int   lineHeight            = Mathf.CeilToInt((float)this.LineHeight * textScaleMultiplier);
        global::dfMarkupStyle style = new global::dfMarkupStyle
        {
            Host               = this,
            Atlas              = this.Atlas,
            Font               = this.Font,
            FontSize           = num,
            FontStyle          = this.FontStyle,
            LineHeight         = lineHeight,
            Color              = base.ApplyOpacity(base.Color),
            Opacity            = base.CalculateOpacity(),
            Align              = this.TextAlignment,
            PreserveWhitespace = this.preserveWhitespace
        };

        this.viewportBox = new global::dfMarkupBox(null, global::dfMarkupDisplayType.block, style)
        {
            Size = base.Size
        };
        for (int i = 0; i < this.elements.Count; i++)
        {
            global::dfMarkupElement dfMarkupElement = this.elements[i];
            if (dfMarkupElement != null)
            {
                dfMarkupElement.PerformLayout(this.viewportBox, style);
            }
        }
    }