(12dd79a54) Fixed GUIListBoxes still sometimes leaving the last row out when using a grid layout

This commit is contained in:
Joonas Rikkonen
2019-04-17 12:44:55 +03:00
parent b8354d37a5
commit 9dea124ec2
@@ -511,10 +511,8 @@ namespace Barotrauma
pos = 0;
totalSize += child.Rect.Width + spacing;
}
else
{
pos += child.Rect.Height + spacing;
}
pos += child.Rect.Height + spacing;
if (child == children.Last())
{
totalSize += child.Rect.Width + spacing;
@@ -527,10 +525,7 @@ namespace Barotrauma
pos = 0;
totalSize += child.Rect.Height + spacing;
}
else
{
pos += child.Rect.Width + spacing;
}
pos += child.Rect.Width + spacing;
if (child == children.Last())
{