I can’t figure out how to do the simplest things with display.newText. How do I get line breaks to work. \n isn’t doing anything and the docs have absolutely no info on this!
All the string formatting stuff looks neat on the terminal window, but I need it to show up on screen!
Any help would be greatly appreciated. [import]uid: 10835 topic_id: 4204 reply_id: 304204[/import]
local myTxt = display.newText("hello\nworld", 10, 10, native.systemFont, 10)
… the newline does not get rendered. I get an output like:
helloworld
So referring back to the OP’s question, how do newlines work in Corona. The Lua docs say to use ‘\n’ but that isn’t working with display.newText() [import]uid: 3365 topic_id: 4204 reply_id: 58295[/import]
I just built that to device and it doesnt add the new lines, despite working in the simulator.
The only option i can see now is to use the natve.newTextBox, which DOES allow the use of \n but unfortunetly isnt supported in the simulator. [import]uid: 69826 topic_id: 4204 reply_id: 58331[/import]
BUT that as you said just does not work also and the simples question is:
The command “\n” does not work totally?
Sorry guys, but that is really important for me right now.
Regards,
Rodrigo. [import]uid: 89165 topic_id: 4204 reply_id: 58438[/import]