#528 configurator fixes, restoring textbox whitespace handling and adding specific trim whitespace option

This commit is contained in:
Mikayla Fischler
2024-10-12 00:30:58 -04:00
parent 0497ec44e9
commit 89ab742f8e
8 changed files with 15 additions and 14 deletions

View File

@@ -7,7 +7,7 @@ local flasher = require("graphics.flasher")
local core = {}
core.version = "2.4.2"
core.version = "2.4.3"
core.flasher = flasher
core.events = events

View File

@@ -10,6 +10,7 @@ local ALIGN = core.ALIGN
---@class textbox_args
---@field text string text to show
---@field alignment? ALIGN text alignment, left by default
---@field trim_whitespace? boolean true to trim whitespace before/after lines of text
---@field anchor? boolean true to use this as an anchor, making it focusable
---@field parent graphics_element
---@field id? string element id
@@ -59,7 +60,7 @@ return function (args)
-- trim leading/trailing whitespace, except on the first line
-- leading whitespace on the first line is usually intentional
if i > 1 then
if args.trim_whitespace == true then
lines[i] = util.trim(lines[i])
end