Class widget:overlay
Overlay widget
This module is only available from the UI process Lua state.
The overlay widget allows independent layers of widgets.
Methods
overlay:pack (child, options)
Add a widget to the overlay; it will be stacked on top of the main child widget. Multiple overlaying widgets can be added; their order affects the order in which they will be rendered, if they overlap.
The options table has two keys that can be set: halign
and valign
. There
are five possible values for these keys:
fill
: expand the new child widget to fill the total available area.start
: align the new child widget to the left/top.end
: align the new child widget to the right/bottom.center
: align the new child widget to the center.baseline
: align according to the child widget's baseline. Only works forvalign
.
Parameters
-
childType: widgetThe widget to add as a new child.
-
optionsType: table or nilTable of options.
overlay:reorder_child (child, position)
Reorder a widget already in the overlay. The order affects draw order and focus order.
Parameters
-
childType: widgetThe child widget to reorder.
-
positionType: integerThe position to move the widget to.
Attribution
Copyright
- 2010 Mason Larobina