public void RemoveChildNice(View child)
{
if (base.children.Length != 1)
{
int num = base.IndexOfChild(child);
float t = 0f;
if (num == 0)
{
t = 0f;
}
else if (num == (base.children.Length - 1))
{
t = 1f;
}
else
{
t = 0.5f;
}
t = !this.vertical ? Mathf.Lerp(child.position.xMin, child.position.xMax, t) : Mathf.Lerp(child.position.yMin, child.position.yMax, t);
if (num > 0)
{
View view = base.children[num - 1];
Rect position = view.position;
if (this.vertical)
{
position.yMax = t;
}
else
{
position.xMax = t;
}
view.position = position;
if (view is SplitView)
{
((SplitView) view).Reflow();
}
}
if (num < (base.children.Length - 1))
{
View view2 = base.children[num + 1];
Rect rect6 = view2.position;
if (this.vertical)
{
view2.position = new Rect(rect6.x, t, rect6.width, rect6.yMax - t);
}
else
{
view2.position = new Rect(t, rect6.y, rect6.xMax - t, rect6.height);
}
if (view2 is SplitView)
{
((SplitView) view2).Reflow();
}
}
}
this.RemoveChild(child);
}