From 499ec7c5b0315d00a36a6fc2775bd2e8ac722437 Mon Sep 17 00:00:00 2001 From: Mikayla Fischler Date: Sun, 29 Sep 2024 11:55:53 -0400 Subject: [PATCH] fixed configurator section titles not being offset --- graphics/core.lua | 2 +- graphics/elements/TextBox.lua | 7 +++++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/graphics/core.lua b/graphics/core.lua index 165c8b0..e71a702 100644 --- a/graphics/core.lua +++ b/graphics/core.lua @@ -7,7 +7,7 @@ local flasher = require("graphics.flasher") local core = {} -core.version = "2.4.1" +core.version = "2.4.2" core.flasher = flasher core.events = events diff --git a/graphics/elements/TextBox.lua b/graphics/elements/TextBox.lua index cc3c4aa..4c4b5ea 100644 --- a/graphics/elements/TextBox.lua +++ b/graphics/elements/TextBox.lua @@ -57,8 +57,11 @@ return function (args) for i = 1, #lines do if i > e.frame.h then break end - -- trim leading/trailing whitespace - lines[i] = util.trim(lines[i]) + -- trim leading/trailing whitespace, except on the first line + -- leading whitespace on the first line is usually intentional + if i > 1 then + lines[i] = util.trim(lines[i]) + end local len = string.len(lines[i])