Merge branch 'fix-properties-1st-offset' of https://github.com/Tryibion/FlaxEngine into Tryibion-fix-properties-1st-offset

This commit is contained in:
Wojtek Figat
2024-05-05 22:55:26 +02:00

View File

@@ -242,7 +242,7 @@ namespace FlaxEditor.CustomEditors.GUI
float namesWidth = _splitterValue * Width; float namesWidth = _splitterValue * Width;
int count = _element.Labels.Count; int count = _element.Labels.Count;
float[] yStarts = new float[count + 1]; float[] yStarts = new float[count + 1];
for (int i = 1; i < count; i++) for (int i = 0; i < count; i++)
{ {
var label = _element.Labels[i]; var label = _element.Labels[i];
@@ -251,9 +251,13 @@ namespace FlaxEditor.CustomEditors.GUI
else if (_children.Count <= label.FirstChildControlIndex) else if (_children.Count <= label.FirstChildControlIndex)
yStarts[i] = y; yStarts[i] = y;
else else
{
yStarts[i] = _children[label.FirstChildControlIndex].Top; yStarts[i] = _children[label.FirstChildControlIndex].Top;
if (i == count - 1)
yStarts[i + 1] = _children[label.FirstChildControlIndex].Bottom;
}
} }
yStarts[count] = y;
for (int i = 0; i < count; i++) for (int i = 0; i < count; i++)
{ {
var label = _element.Labels[i]; var label = _element.Labels[i];