Draw a Textbox No borders
nil Draw:TextBox(x, y, text, width, height, color, offsetx, offsety)
local function Draw:TextBox(x, y, text, width, height, color, offsetx, offsety) local x = x or error("number expected got ".. type(x), 1) local y = y or error("number expected got ".. type(x), 1) local text = text or error("[string or table] expected got ".. type(x), 1) local width = width or error("number expected got ".. type(x), 1) if (type(text) == "string") then text = { text } end local width = width or (480 - x) local height = height or (272 - y) local color = color or Color.new(255,255,255) local offsetx = offsetx or 0 -- Change offset X to something local offsety = offsety or 1 -- Change offset Y to something local MaxLines = math.floor((height -8) / 8 ) local Padding = math.floor(((height- 8)-(MaxLines*8))/2) local MaxLetters = math.floor( width / (480/59)) for i = 0, MaxLines do value = text[offsety + i] if (value ~= "") and (value) then value = string.sub(value, offsetx, offsetx+MaxLetters) end if (value ~= "") and (value) then screen:print(x + 5, y+Padding+(i*8), value, color) end end return MaxLines, MaxLetters end