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 for valign.

Parameters

  • child
    Type: widget
    The widget to add as a new child.
  • options
    Type: table or nil
    Table of options.

overlay:reorder_child (child, position)

Reorder a widget already in the overlay. The order affects draw order and focus order.

Parameters

  • child
    Type: widget
    The child widget to reorder.
  • position
    Type: integer
    The position to move the widget to.

Attribution

Copyright