Box Layouts#
Functions#
- eg-overlay-ui.box(orientation)#
Create a new box layout container. Box layout containers arrange their child elements sequentially in either a vertical or horizontal fashion.
- Parameters:
orientation (
string
) – The layout orientation. Eithervertical
orhorizontal
.- Returns:
A new
uibox
.
Version History
Version
Notes
0.0.1
Added
Classes#
- class eg-overlay-ui.uibox#
A box layout container.
Box layout containers arrange their child elements sequentially in either a vertical or horizontal fashion.
- padding(left, right, top, bottom)#
Set the internal padding used between the edge of the box and its child elements.
Version History
Version
Notes
0.0.1
Added
- pack_end(uielement[, expand[, align]])#
Add a child element to this box. It will be added after any exist elements.
- Parameters:
uielement – Child element
expand (
boolean
) – (Optional) Should the child element expand to fill any extra space within the box? Default:false
align (
string
) – (Optional) The child’s alignment within the box. Note: this is perpendicular to the axis of the box. In a horizontal box, this is the vertical alignment. Must be one of:'start'
,'middle'
,'end'
, or'fill'
. Default:'start'
Version History
Version
Notes
0.0.1
Added
- align(alignment)#
Set the alignment of all child elements within the box.
This is along the axis of the box. For a horizontal box,
'start'
will cause child elements to be drawn to the left most portion of the box,'middle'
will center the elements, and'end'
will draw the child elements to the right most portion.- Parameters:
alignment – Alignment value. Must be one of:
'start'
,'middle'
,'end'
.
Version History
Version
Notes
0.0.1
Added
- spacing(value)#
Set the spacing inserted between child elements.
- Parameters:
value (
integer
)
Version History
Version
Notes
0.0.1
Added
- item_count()#
Return the number of child elements in this box.
- Return type:
Version History
Version
Notes
0.0.1
Added
- pop_start()#
Remove the first child element from this box.
Version History
Version
Notes
0.0.1
Added
- pop_end()#
Remove the last child element from this box.
Version History
Version
Notes
0.1.0
Added
- addeventhandler(func)#
Add an event handler for this UI element. See UI Events.
- Parameters:
func (
function
)- Return type:
- Returns:
A id that can be used with
removeeventhandler()
Version History
Version
Notes
0.1.0
Added
- removeeventhandler(id)#
Remove an event handler for this UI element.
- Parameters:
id (
integer
)
Version History
Version
Notes
0.1.0
Added