1
0
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:
SmallJoker
2017-05-13 13:14:41 +02:00
committed by paramat
parent fd32005b0f
commit 0120fe16a7
5 changed files with 44 additions and 8 deletions

View File

@@ -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

View File

@@ -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 .. ";"

View File

@@ -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 = {}