fixed bug with textbox alignment

This commit is contained in:
Mikayla Fischler 2022-08-09 00:40:02 -04:00
parent 252c48a02c
commit 02c3c5c53c

View File

@ -42,9 +42,9 @@ local function textbox(args)
-- use cursor position to align this line
if alignment == TEXT_ALIGN.CENTER then
e.window.setCursorPos(math.floor((e.frame.w - len) / 2), i)
e.window.setCursorPos(math.floor((e.frame.w - len) / 2) + 1, i)
elseif alignment == TEXT_ALIGN.RIGHT then
e.window.setCursorPos(e.frame.w - len, i)
e.window.setCursorPos((e.frame.w - len) + 1, i)
else
e.window.setCursorPos(1, i)
end