D3ltaQ's picture
Upload 2197 files
24b81cb verified
raw
history blame contribute delete
449 Bytes
// -----------------------------------------------------------
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);
}
};