2022-06-06 19:42:39 +00:00
|
|
|
-- Root Display Box Graphics Element
|
|
|
|
|
|
|
|
local element = require("graphics.element")
|
|
|
|
|
|
|
|
---@class displaybox_args
|
|
|
|
---@field window table
|
|
|
|
---@field x? integer 1 if omitted
|
|
|
|
---@field y? integer 1 if omitted
|
|
|
|
---@field width? integer parent width if omitted
|
|
|
|
---@field height? integer parent height if omitted
|
|
|
|
---@field gframe? graphics_frame frame instead of x/y/width/height
|
|
|
|
---@field fg_bg? cpair foreground/background colors
|
2023-05-25 21:40:16 +00:00
|
|
|
---@field hidden? boolean true to hide on initial draw
|
2022-06-06 19:42:39 +00:00
|
|
|
|
|
|
|
-- new root display box
|
2023-02-25 00:50:01 +00:00
|
|
|
---@nodiscard
|
2022-06-06 19:42:39 +00:00
|
|
|
---@param args displaybox_args
|
|
|
|
local function displaybox(args)
|
|
|
|
-- create new graphics element base object
|
2023-05-30 23:51:10 +00:00
|
|
|
return element.new(args).complete()
|
2022-06-06 19:42:39 +00:00
|
|
|
end
|
|
|
|
|
|
|
|
return displaybox
|