mirror of
https://github.com/MikaylaFischler/cc-mek-scada.git
synced 2024-08-30 18:22:34 +00:00
#63 div graphics element
This commit is contained in:
parent
89437b2be9
commit
7dbc5594b0
21
graphics/elements/div.lua
Normal file
21
graphics/elements/div.lua
Normal file
@ -0,0 +1,21 @@
|
||||
-- Div (Division, like in HTML) Graphics Element
|
||||
|
||||
local element = require("graphics.element")
|
||||
|
||||
---@class div_args
|
||||
---@field parent graphics_element
|
||||
---@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
|
||||
|
||||
-- new div element
|
||||
---@param args div_args
|
||||
local function div(args)
|
||||
-- create new graphics element base object
|
||||
return element.new(args).get()
|
||||
end
|
||||
|
||||
return div
|
Loading…
Reference in New Issue
Block a user