mirror of
https://github.com/MikaylaFischler/cc-mek-scada.git
synced 2024-08-30 18:22:34 +00:00
#63 rectangle construct asserts
This commit is contained in:
parent
ce227a175a
commit
8002698dd0
@ -21,6 +21,9 @@ local function rectangle(args)
|
||||
-- draw bordered box if requested
|
||||
-- element constructor will have drawn basic colored rectangle regardless
|
||||
if args.border ~= nil then
|
||||
assert(args.border.width * 2 <= e.frame.w, "graphics.elements.rectangle: border too thick for width")
|
||||
assert(args.border.width * 2 <= e.frame.h, "graphics.elements.rectangle: border too thick for height")
|
||||
|
||||
e.setCursorPos(1, 1)
|
||||
|
||||
local border_width = args.border.width
|
||||
|
Loading…
Reference in New Issue
Block a user