File size: 449 Bytes
24b81cb |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 |
// -----------------------------------------------------------
class VerticalSpacer : SpacerBase
{
reference int border;
reference int gap;
override protected void UpdateChild(Widget child, float w, float h, int index)
{
float itemWidth = w - (2 * border);
float itemHeight = (h - (border * 2) - ((m_count - 1) * gap)) / m_count;
child.SetPos(border, border + ((itemHeight + gap) * index));
child.SetSize(itemWidth, itemHeight);
}
}; |