// Token: 0x06004735 RID: 18229 RVA: 0x0010D434 File Offset: 0x0010B634 protected override void _PerformLayoutImpl(global::dfMarkupBox container, global::dfMarkupStyle style) { if (base.ChildNodes.Count == 0) { return; } float x = container.Size.x; global::dfMarkupBox dfMarkupBox = new global::dfMarkupBox(this, global::dfMarkupDisplayType.listItem, style); dfMarkupBox.Margins.top = 10; container.AddChild(dfMarkupBox); global::dfMarkupTagList dfMarkupTagList = base.Parent as global::dfMarkupTagList; if (dfMarkupTagList == null) { base._PerformLayoutImpl(container, style); return; } style.VerticalAlign = global::dfMarkupVerticalAlign.Baseline; string text = "•"; if (dfMarkupTagList.TagName == "ol") { text = container.Children.Count + "."; } global::dfMarkupStyle style2 = style; style2.VerticalAlign = global::dfMarkupVerticalAlign.Baseline; style2.Align = global::dfMarkupTextAlign.Right; global::dfMarkupBoxText dfMarkupBoxText = global::dfMarkupBoxText.Obtain(this, global::dfMarkupDisplayType.inlineBlock, style2); dfMarkupBoxText.SetText(text); dfMarkupBoxText.Width = dfMarkupTagList.BulletWidth; dfMarkupBoxText.Margins.left = style.FontSize * 2; dfMarkupBox.AddChild(dfMarkupBoxText); global::dfMarkupBox dfMarkupBox2 = new global::dfMarkupBox(this, global::dfMarkupDisplayType.inlineBlock, style); int fontSize = style.FontSize; float num = x - dfMarkupBoxText.Size.x - (float)dfMarkupBoxText.Margins.left - (float)fontSize; dfMarkupBox2.Size = new Vector2(num, (float)fontSize); dfMarkupBox2.Margins.left = (int)((float)style.FontSize * 0.5f); dfMarkupBox.AddChild(dfMarkupBox2); for (int i = 0; i < base.ChildNodes.Count; i++) { base.ChildNodes[i].PerformLayout(dfMarkupBox2, style); } dfMarkupBox2.FitToContents(false); dfMarkupBox2.Parent.FitToContents(false); dfMarkupBox.FitToContents(false); }
// Token: 0x0600474B RID: 18251 RVA: 0x0010DB94 File Offset: 0x0010BD94 protected override void _PerformLayoutImpl(global::dfMarkupBox container, global::dfMarkupStyle style) { if (base.Owner == null) { Debug.LogError("Tag has no parent: " + this); return; } style = this.applyStyleAttributes(style); global::dfMarkupAttribute dfMarkupAttribute = base.findAttribute(new string[] { "src" }); if (dfMarkupAttribute == null) { return; } string value = dfMarkupAttribute.Value; global::dfMarkupBox dfMarkupBox = this.createImageBox(base.Owner.Atlas, value, style); if (dfMarkupBox == null) { return; } Vector2 size = Vector2.zero; global::dfMarkupAttribute dfMarkupAttribute2 = base.findAttribute(new string[] { "height" }); if (dfMarkupAttribute2 != null) { size.y = (float)global::dfMarkupStyle.ParseSize(dfMarkupAttribute2.Value, (int)dfMarkupBox.Size.y); } global::dfMarkupAttribute dfMarkupAttribute3 = base.findAttribute(new string[] { "width" }); if (dfMarkupAttribute3 != null) { size.x = (float)global::dfMarkupStyle.ParseSize(dfMarkupAttribute3.Value, (int)dfMarkupBox.Size.x); } if (size.sqrMagnitude <= 1.401298E-45f) { size = dfMarkupBox.Size; } else if (size.x <= 1.401298E-45f) { size.x = size.y * (dfMarkupBox.Size.x / dfMarkupBox.Size.y); } else if (size.y <= 1.401298E-45f) { size.y = size.x * (dfMarkupBox.Size.y / dfMarkupBox.Size.x); } dfMarkupBox.Size = size; dfMarkupBox.Baseline = (int)size.y; container.AddChild(dfMarkupBox); }
// Token: 0x060046E7 RID: 18151 RVA: 0x0010BC34 File Offset: 0x00109E34 protected override void _PerformLayoutImpl(global::dfMarkupBox container, global::dfMarkupStyle style) { if (style.Font == null) { return; } string text = (!style.PreserveWhitespace && this.isWhitespace) ? " " : this.Text; global::dfMarkupBoxText dfMarkupBoxText = global::dfMarkupBoxText.Obtain(this, global::dfMarkupDisplayType.inline, style); dfMarkupBoxText.SetText(text); container.AddChild(dfMarkupBoxText); }
// Token: 0x06004738 RID: 18232 RVA: 0x0010D5FC File Offset: 0x0010B7FC protected override void _PerformLayoutImpl(global::dfMarkupBox container, global::dfMarkupStyle style) { if (base.ChildNodes.Count == 0) { return; } style = base.applyTextStyleAttributes(style); int top = (container.Children.Count != 0) ? style.LineHeight : 0; global::dfMarkupBox dfMarkupBox; if (style.BackgroundColor.a > 0.005f) { global::dfMarkupBoxSprite dfMarkupBoxSprite = new global::dfMarkupBoxSprite(this, global::dfMarkupDisplayType.block, style); dfMarkupBoxSprite.Atlas = base.Owner.Atlas; dfMarkupBoxSprite.Source = base.Owner.BlankTextureSprite; dfMarkupBoxSprite.Style.Color = style.BackgroundColor; dfMarkupBox = dfMarkupBoxSprite; } else { dfMarkupBox = new global::dfMarkupBox(this, global::dfMarkupDisplayType.block, style); } dfMarkupBox.Margins = new global::dfMarkupBorders(0, 0, top, style.LineHeight); global::dfMarkupAttribute dfMarkupAttribute = base.findAttribute(new string[] { "margin" }); if (dfMarkupAttribute != null) { dfMarkupBox.Margins = global::dfMarkupBorders.Parse(dfMarkupAttribute.Value); } global::dfMarkupAttribute dfMarkupAttribute2 = base.findAttribute(new string[] { "padding" }); if (dfMarkupAttribute2 != null) { dfMarkupBox.Padding = global::dfMarkupBorders.Parse(dfMarkupAttribute2.Value); } container.AddChild(dfMarkupBox); base._PerformLayoutImpl(dfMarkupBox, style); if (dfMarkupBox.Children.Count > 0) { dfMarkupBox.Children[dfMarkupBox.Children.Count - 1].IsNewline = true; } dfMarkupBox.FitToContents(true); }
// Token: 0x06004745 RID: 18245 RVA: 0x0010DA3C File Offset: 0x0010BC3C protected override void _PerformLayoutImpl(global::dfMarkupBox container, global::dfMarkupStyle style) { style = base.applyTextStyleAttributes(style); style.PreserveWhitespace = true; style.Preformatted = true; if (style.Align == global::dfMarkupTextAlign.Justify) { style.Align = global::dfMarkupTextAlign.Left; } global::dfMarkupBox dfMarkupBox; if (style.BackgroundColor.a > 0.1f) { global::dfMarkupBoxSprite dfMarkupBoxSprite = new global::dfMarkupBoxSprite(this, global::dfMarkupDisplayType.block, style); dfMarkupBoxSprite.LoadImage(base.Owner.Atlas, base.Owner.BlankTextureSprite); dfMarkupBoxSprite.Style.Color = style.BackgroundColor; dfMarkupBox = dfMarkupBoxSprite; } else { dfMarkupBox = new global::dfMarkupBox(this, global::dfMarkupDisplayType.block, style); } global::dfMarkupAttribute dfMarkupAttribute = base.findAttribute(new string[] { "margin" }); if (dfMarkupAttribute != null) { dfMarkupBox.Margins = global::dfMarkupBorders.Parse(dfMarkupAttribute.Value); } global::dfMarkupAttribute dfMarkupAttribute2 = base.findAttribute(new string[] { "padding" }); if (dfMarkupAttribute2 != null) { dfMarkupBox.Padding = global::dfMarkupBorders.Parse(dfMarkupAttribute2.Value); } container.AddChild(dfMarkupBox); base._PerformLayoutImpl(dfMarkupBox, style); dfMarkupBox.FitToContents(false); }
// Token: 0x06004731 RID: 18225 RVA: 0x0010D288 File Offset: 0x0010B488 protected override void _PerformLayoutImpl(global::dfMarkupBox container, global::dfMarkupStyle style) { if (base.ChildNodes.Count == 0) { return; } style.Align = global::dfMarkupTextAlign.Left; global::dfMarkupBox dfMarkupBox = new global::dfMarkupBox(this, global::dfMarkupDisplayType.block, style); container.AddChild(dfMarkupBox); this.calculateBulletWidth(style); for (int i = 0; i < base.ChildNodes.Count; i++) { global::dfMarkupTag dfMarkupTag = base.ChildNodes[i] as global::dfMarkupTag; if (dfMarkupTag != null && !(dfMarkupTag.TagName != "li")) { dfMarkupTag.PerformLayout(dfMarkupBox, style); } } dfMarkupBox.FitToContents(false); }
// Token: 0x0600473E RID: 18238 RVA: 0x0010D7E0 File Offset: 0x0010B9E0 protected override void _PerformLayoutImpl(global::dfMarkupBox container, global::dfMarkupStyle style) { global::dfMarkupBorders margins = default(global::dfMarkupBorders); global::dfMarkupStyle style2 = this.applyDefaultStyles(style, ref margins); style2 = base.applyTextStyleAttributes(style2); global::dfMarkupAttribute dfMarkupAttribute = base.findAttribute(new string[] { "margin" }); if (dfMarkupAttribute != null) { margins = global::dfMarkupBorders.Parse(dfMarkupAttribute.Value); } global::dfMarkupBox dfMarkupBox = new global::dfMarkupBox(this, global::dfMarkupDisplayType.block, style2); dfMarkupBox.Margins = margins; container.AddChild(dfMarkupBox); base._PerformLayoutImpl(dfMarkupBox, style2); dfMarkupBox.FitToContents(false); }