public override void CalcHeight()
{
if (base.entries.Count == 0)
{
base.maxHeight = base.minHeight = 0f;
}
else
{
base.m_ChildMinHeight = base.m_ChildMaxHeight = 0f;
int topBorder = 0;
int bottomBorder = 0;
base.m_StretchableCountY = 0;
if (!base.isVertical)
{
this.m_LineInfo = new LineInfo[this.m_Lines];
for (int i = 0; i < this.m_Lines; i++)
{
this.m_LineInfo[i].topBorder = 0x2710;
this.m_LineInfo[i].bottomBorder = 0x2710;
}
foreach (GUILayoutEntry entry in base.entries)
{
entry.CalcHeight();
int y = (int) entry.rect.y;
this.m_LineInfo[y].minSize = Mathf.Max(entry.minHeight, this.m_LineInfo[y].minSize);
this.m_LineInfo[y].maxSize = Mathf.Max(entry.maxHeight, this.m_LineInfo[y].maxSize);
this.m_LineInfo[y].topBorder = Mathf.Min(entry.margin.top, this.m_LineInfo[y].topBorder);
this.m_LineInfo[y].bottomBorder = Mathf.Min(entry.margin.bottom, this.m_LineInfo[y].bottomBorder);
}
for (int j = 0; j < this.m_Lines; j++)
{
base.m_ChildMinHeight += this.m_LineInfo[j].minSize;
base.m_ChildMaxHeight += this.m_LineInfo[j].maxSize;
}
for (int k = 1; k < this.m_Lines; k++)
{
float num8 = Mathf.Max(this.m_LineInfo[k - 1].bottomBorder, this.m_LineInfo[k].topBorder);
base.m_ChildMinHeight += num8;
base.m_ChildMaxHeight += num8;
}
topBorder = this.m_LineInfo[0].topBorder;
bottomBorder = this.m_LineInfo[this.m_LineInfo.Length - 1].bottomBorder;
}
float num9 = 0f;
float num10 = 0f;
this.margin.top = topBorder;
this.margin.bottom = bottomBorder;
num9 = num10 = 0f;
base.minHeight = Mathf.Max(base.minHeight, (base.m_ChildMinHeight + num9) + num10);
if (base.maxHeight == 0f)
{
base.stretchHeight += base.m_StretchableCountY + (!base.style.stretchHeight ? 0 : 1);
base.maxHeight = (base.m_ChildMaxHeight + num9) + num10;
}
else
{
base.stretchHeight = 0;
}
base.maxHeight = Mathf.Max(base.maxHeight, base.minHeight);
}
}