Calculator Community > Lua
strings..
(1/1)
LDStudios:
Does anyone know why commands like \n (new line) and \b (backspace) work fine for me in student software, but on calc, they just display a rectangle
Adriweb:
Yep, it's a known issue - don't rely on them.
Instead, split the string yourself (at each \n) and store the parts in a table which you'll iterate through and call drawString on each parts.
example :
--- Code: ---local myTable = myString:split("\n")
for i, str in ipairs(myTable ) do
gc:drawString(str, 5, 5 + i * 10, "top")
end
--- End code ---
Navigation
[0] Message Index
Go to full version