UnityEditor.FlowLayout.SetVertical C# (CSharp) Method

SetVertical() public method

public SetVertical ( float y, float height ) : void
y float
height float
return void
        public override void SetVertical(float y, float height)
        {
            if (base.entries.Count == 0)
            {
                base.SetVertical(y, height);
            }
            else if (base.isVertical)
            {
                base.SetVertical(y, height);
            }
            else
            {
                if (base.resetCoords)
                {
                    y = 0f;
                }
                float num = y - this.margin.top;
                float num2 = y + this.margin.vertical;
                float num3 = num2 - (base.spacing * (this.m_Lines - 1));
                float t = 0f;
                if (base.m_ChildMinHeight != base.m_ChildMaxHeight)
                {
                    t = Mathf.Clamp((float) ((num3 - base.m_ChildMinHeight) / (base.m_ChildMaxHeight - base.m_ChildMinHeight)), (float) 0f, (float) 1f);
                }
                float num5 = num;
                for (int i = 0; i < this.m_Lines; i++)
                {
                    if (i > 0)
                    {
                        num5 += Mathf.Max(this.m_LineInfo[i].topBorder, this.m_LineInfo[i - 1].bottomBorder);
                    }
                    this.m_LineInfo[i].start = num5;
                    this.m_LineInfo[i].size = Mathf.Lerp(this.m_LineInfo[i].minSize, this.m_LineInfo[i].maxSize, t);
                    num5 += this.m_LineInfo[i].size + base.spacing;
                }
                foreach (GUILayoutEntry entry in base.entries)
                {
                    LineInfo info = this.m_LineInfo[(int) entry.rect.y];
                    if (entry.stretchHeight != 0)
                    {
                        entry.SetVertical(info.start + entry.margin.top, info.size - entry.margin.vertical);
                    }
                    else
                    {
                        entry.SetVertical(info.start + entry.margin.top, Mathf.Clamp(info.size - entry.margin.vertical, entry.minHeight, entry.maxHeight));
                    }
                }
            }
        }