From 02c3c5c53ceb60b97418095fc54138c0ea0bff14 Mon Sep 17 00:00:00 2001 From: Mikayla Fischler Date: Tue, 9 Aug 2022 00:40:02 -0400 Subject: [PATCH] fixed bug with textbox alignment --- graphics/elements/textbox.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/graphics/elements/textbox.lua b/graphics/elements/textbox.lua index 14b5591..45eb92f 100644 --- a/graphics/elements/textbox.lua +++ b/graphics/elements/textbox.lua @@ -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