public override void SetVertical(float y, float height)
{
float num = height;
if (this.needsHorizontalScrollbar)
{
num -= this.horizontalScrollbar.fixedHeight + this.horizontalScrollbar.margin.top;
}
if (this.allowVerticalScroll && (num < this.calcMinHeight))
{
if (!this.needsHorizontalScrollbar && !this.needsVerticalScrollbar)
{
this.clientWidth = (this.rect.width - this.verticalScrollbar.fixedWidth) - this.verticalScrollbar.margin.left;
if (this.clientWidth < this.calcMinWidth)
{
this.clientWidth = this.calcMinWidth;
}
float width = this.rect.width;
this.SetHorizontal(this.rect.x, this.clientWidth);
this.CalcHeight();
this.rect.width = width;
}
float minHeight = base.minHeight;
float maxHeight = base.maxHeight;
base.minHeight = this.calcMinHeight;
base.maxHeight = this.calcMaxHeight;
base.SetVertical(y, this.calcMinHeight);
base.minHeight = minHeight;
base.maxHeight = maxHeight;
this.rect.height = height;
this.clientHeight = this.calcMinHeight;
}
else
{
if (this.allowVerticalScroll)
{
base.minHeight = this.calcMinHeight;
base.maxHeight = this.calcMaxHeight;
}
base.SetVertical(y, num);
this.rect.height = height;
this.clientHeight = num;
}
}
}