return columnInfo;
}
@Override
public Vector2i getPreferredContentSize(Canvas canvas, Vector2i areaHint) {
Vector2i availableSize = new Vector2i(areaHint);
int numColumns = TeraMath.ceilToInt((float) widgetList.size() / rows);
if (numColumns > 0) {
availableSize.x -= horizontalSpacing * (numColumns - 1);
}
if (rows > 0) {
availableSize.y -= verticalSpacing * (rows - 1);
}
Iterator<List<UIWidget>> columns = getColumnIterator();
Vector2i size = new Vector2i();
int[] rowSizes = new int[rows];
while (columns.hasNext()) {
List<UIWidget> column = columns.next();
ColumnInfo columnInfo = calculateColumnSize(column, canvas, availableSize);
size.x += columnInfo.width;