#544 #545 work on graphics

This commit is contained in:
Mikayla Fischler
2024-09-21 18:38:25 -04:00
parent 2047794173
commit 1d53241b82
13 changed files with 126 additions and 161 deletions

View File

@@ -14,15 +14,15 @@ local element = require("graphics.element")
---@field fg_bg? cpair foreground/background colors
---@field hidden? boolean true to hide on initial draw
-- new multipane element
-- Create a new multipane container element.
---@nodiscard
---@param args multipane_args
---@return graphics_element element, element_id id
local function multipane(args)
---@return MultiPane element, element_id id
return function (args)
element.assert(type(args.panes) == "table", "panes is a required field")
-- create new graphics element base object
local e = element.new(args)
local e = element.new(args --[[@as graphics_args]])
e.value = 1
@@ -41,10 +41,8 @@ local function multipane(args)
end
end
-- initial draw
e.redraw()
---@class MultiPane:graphics_element
local MultiPane, id = e.complete(true)
return e.complete()
return MultiPane, id
end
return multipane