#63 cleanup and assertions

This commit is contained in:
Mikayla Fischler
2022-06-11 17:06:32 -04:00
parent 4488a0594f
commit 89437b2be9
12 changed files with 46 additions and 23 deletions

View File

@@ -21,7 +21,7 @@ local TEXT_ALIGN = core.graphics.TEXT_ALIGN
-- new text box
---@param args textbox_args
local function textbox(args)
assert(args.text ~= nil, "graphics.elements.textbox: empty text box")
assert(type(args.text) == "string", "graphics.elements.textbox: text is a required field")
-- create new graphics element base object
local e = element.new(args)