// 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: 0x0600469A RID: 18074 RVA: 0x00109D58 File Offset: 0x00107F58 public dfMarkupBox(global::dfMarkupElement element, global::dfMarkupDisplayType display, global::dfMarkupStyle style) { this.Element = element; this.Display = display; this.Style = style; this.Baseline = style.FontSize; }
// Token: 0x060046FC RID: 18172 RVA: 0x0010C054 File Offset: 0x0010A254 private global::dfMarkupElement parseElement(Queue <global::dfMarkupElement> tokens) { global::dfMarkupElement dfMarkupElement = tokens.Dequeue(); if (dfMarkupElement is global::dfMarkupString) { return(((global::dfMarkupString)dfMarkupElement).SplitWords()); } global::dfMarkupTag dfMarkupTag = (global::dfMarkupTag)dfMarkupElement; if (dfMarkupTag.IsClosedTag || dfMarkupTag.IsEndTag) { return(this.refineTag(dfMarkupTag)); } while (tokens.Count > 0) { global::dfMarkupElement dfMarkupElement2 = this.parseElement(tokens); if (dfMarkupElement2 is global::dfMarkupTag) { global::dfMarkupTag dfMarkupTag2 = (global::dfMarkupTag)dfMarkupElement2; if (dfMarkupTag2.IsEndTag) { if (dfMarkupTag2.TagName == dfMarkupTag.TagName) { break; } return(this.refineTag(dfMarkupTag)); } } dfMarkupTag.AddChildNode(dfMarkupElement2); } return(this.refineTag(dfMarkupTag)); }
// 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); } } }
// Token: 0x06004711 RID: 18193 RVA: 0x0010CB50 File Offset: 0x0010AD50 public dfMarkupTag(global::dfMarkupTag original) { this.TagName = original.TagName; this.Attributes = original.Attributes; this.IsEndTag = original.IsEndTag; this.IsClosedTag = original.IsClosedTag; this.IsInline = original.IsInline; this.id = original.id; List <global::dfMarkupElement> childNodes = original.ChildNodes; for (int i = 0; i < childNodes.Count; i++) { global::dfMarkupElement node = childNodes[i]; base.AddChildNode(node); } }
// Token: 0x0600478C RID: 18316 RVA: 0x0010EAB0 File Offset: 0x0010CCB0 private global::dfMarkupTag hitTestTag(global::dfMouseEventArgs args) { Vector2 point = base.GetHitPosition(args) + this.scrollPosition; global::dfMarkupBox dfMarkupBox = this.viewportBox.HitTest(point); if (dfMarkupBox != null) { global::dfMarkupElement dfMarkupElement = dfMarkupBox.Element; while (dfMarkupElement != null && !(dfMarkupElement is global::dfMarkupTag)) { dfMarkupElement = dfMarkupElement.Parent; } return(dfMarkupElement as global::dfMarkupTag); } return(null); }
// Token: 0x060046CA RID: 18122 RVA: 0x0010B30C File Offset: 0x0010950C public static global::dfMarkupBoxText Obtain(global::dfMarkupElement element, global::dfMarkupDisplayType display, global::dfMarkupStyle style) { if (global::dfMarkupBoxText.objectPool.Count > 0) { global::dfMarkupBoxText dfMarkupBoxText = global::dfMarkupBoxText.objectPool.Dequeue(); dfMarkupBoxText.Element = element; dfMarkupBoxText.Display = display; dfMarkupBoxText.Style = style; dfMarkupBoxText.Position = Vector2.zero; dfMarkupBoxText.Size = Vector2.zero; dfMarkupBoxText.Baseline = (int)((float)style.FontSize * 1.1f); dfMarkupBoxText.Margins = default(global::dfMarkupBorders); dfMarkupBoxText.Padding = default(global::dfMarkupBorders); return(dfMarkupBoxText); } return(new global::dfMarkupBoxText(element, display, style)); }
// Token: 0x060046B4 RID: 18100 RVA: 0x0010AD8C File Offset: 0x00108F8C public dfMarkupBoxSprite(global::dfMarkupElement element, global::dfMarkupDisplayType display, global::dfMarkupStyle style) : base(element, display, style) { }
// Token: 0x060046DC RID: 18140 RVA: 0x0010BA6C File Offset: 0x00109C6C public void AddChildNode(global::dfMarkupElement node) { node.Parent = this; this.ChildNodes.Add(node); }