public override void SetVertical(float y, float height)
{
this.rect.y = y;
this.rect.height = height;
RectOffset padding = base.style.padding;
if (base.isVertical)
{
int num3;
if (base.style != GUIStyle.none)
{
float top = padding.top;
float bottom = padding.bottom;
if (base.entries.Count != 0)
{
top = Mathf.Max(top, (float) base.entries[0].margin.top);
bottom = Mathf.Max(bottom, (float) base.entries[base.entries.Count - 1].margin.bottom);
}
y += top;
height -= bottom + top;
}
if (height != this.state.lastTotalSize)
{
this.state.RelativeToRealSizes((int) height);
this.state.lastTotalSize = (int) height;
for (num3 = 0; num3 < (this.state.realSizes.Length - 1); num3++)
{
this.state.DoSplitter(num3, num3 + 1, 0);
}
}
num3 = 0;
foreach (GUILayoutEntry entry in base.entries)
{
float f = this.state.realSizes[num3];
entry.SetVertical(Mathf.Round(y), Mathf.Round(f));
y += f + base.spacing;
num3++;
}
}
else if (base.style != GUIStyle.none)
{
foreach (GUILayoutEntry entry2 in base.entries)
{
float num5 = Mathf.Max(entry2.margin.top, padding.top);
float num6 = y + num5;
float num7 = (height - Mathf.Max(entry2.margin.bottom, padding.bottom)) - num5;
if (entry2.stretchHeight != 0)
{
entry2.SetVertical(num6, num7);
}
else
{
entry2.SetVertical(num6, Mathf.Clamp(num7, entry2.minHeight, entry2.maxHeight));
}
}
}
else
{
float num8 = y - this.margin.top;
float num9 = height + this.margin.vertical;
foreach (GUILayoutEntry entry3 in base.entries)
{
if (entry3.stretchHeight != 0)
{
entry3.SetVertical(num8 + entry3.margin.top, num9 - entry3.margin.vertical);
}
else
{
entry3.SetVertical(num8 + entry3.margin.top, Mathf.Clamp(num9 - entry3.margin.vertical, entry3.minHeight, entry3.maxHeight));
}
}
}
}
}