mirror of
https://github.com/luanti-org/luanti.git
synced 2025-10-25 21:55:25 +02:00
CSM: Document forgotten functions
This commit is contained in:
@@ -308,7 +308,7 @@ function core.formspec_escape(text)
|
||||
end
|
||||
|
||||
|
||||
function core.splittext(text,charlimit)
|
||||
function core.wrap_text(text, charlimit)
|
||||
local retval = {}
|
||||
|
||||
local current_idx = 1
|
||||
|
||||
@@ -250,7 +250,7 @@ end
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
function text2textlist(xpos, ypos, width, height, tl_name, textlen, text, transparency)
|
||||
local textlines = core.splittext(text, textlen)
|
||||
local textlines = core.wrap_text(text, textlen)
|
||||
local retval = "textlist[" .. xpos .. "," .. ypos .. ";" .. width ..
|
||||
"," .. height .. ";" .. tl_name .. ";"
|
||||
|
||||
|
||||
@@ -75,7 +75,7 @@ local function get_formspec(tabview, name, tabdata)
|
||||
if error == nil then
|
||||
local descriptiontext = descriptionfile:read("*all")
|
||||
|
||||
descriptionlines = core.splittext(descriptiontext,42)
|
||||
descriptionlines = core.wrap_text(descriptiontext, 42)
|
||||
descriptionfile:close()
|
||||
else
|
||||
descriptionlines = {}
|
||||
|
||||
Reference in New Issue
Block a user