Skip to content

Frame

extends Container

Frame: a nestable child container with its own background. Set draggable = true to move it by its top row (customize via draggingMap).

Types

FrameDragZone

FieldTypeDescription
xnumberLocal x coordinate
ynumberLocal y coordinate
width (optional)number|"full"Zone width
height (optional)number|"full"Zone height

Properties

PropertyTypeDefaultDescription
backgroundnumber|falsecolors.grayBackground color (false = transparent)
widthnumber20Width in terminal cells
heightnumber8Height in terminal cells
draggablebooleanfalsemove the frame by its grab zones
draggingMapFrameDragZone[]|falsefalseList of grab zones in local coordinates, e.g. 1; false = the whole top row

Methods

Frame:setup()

Initializes per-instance state and input handlers.

Frame:toFront()

Moves the frame above its siblings (highest z + 1).

  • returns (self)
lua
frame:onFocus(function(f) f:toFront() end)

Last updated:

Released under the MIT License.