Multiline support for display.newText()

Hi! I would like to request for multiline support for display.newText objects.

I notice that there is multiline support for native text fields but couldn’t find any documentation on it for display text objects. It’d be nice to have this so I won’t have to manually enter “\n” to create the newlines. And I’d also be able to change my text easily and know that the display will be updated dynamically and displayed in an appropriate manner.

Thanks! [import]uid: 86395 topic_id: 16723 reply_id: 316723[/import]

Check out the Ansca blog post about this. [import]uid: 13560 topic_id: 16723 reply_id: 62628[/import]

This is available now via daily builds :slight_smile: [import]uid: 84637 topic_id: 16723 reply_id: 63250[/import]

This is what I’m encountering:

On the Mac simulator, the \n doesn’t work (width and height not specified). Instead it only shows the first line. But in windows, the same code displays properly.

On Windows simulator, text wrap doesn’t work (width and height specified). It shows everything in one line. But in mac, the same code displays properly.

I’m using build 644. [import]uid: 86395 topic_id: 16723 reply_id: 63291[/import]

The Windows simulator will support text wrapping in build 646. It should be available tomorrow, 10/25. [import]uid: 32256 topic_id: 16723 reply_id: 63306[/import]

I saw somewhere (can’t find it now) that someone complained about newRetinaText (which is now part of the SDK) not supporting newlines.

I have an idea – rather than having newText() and newRetinaText(), why not just make newText() work like newRetinaText() anyway, or at least have an option like
useRetinaTextIfPossible = true

The default could be true, but you could set it to false if you like blurry, jagged text. :slight_smile: Ideally, Corona would be smart enough to determine whether it should use the higher quality text anyway.

And then it would be great if any feature added to newText() also happened simultaneously to the higher quality equivalent. Like the newline thing. I don’t want to have to think about which one I should use, and whether it supports the same options…

For that matter, maybe newImage and newImageRect could be consolidated as well.

Keep up the good work! I’m still enjoying Corona, and hope to have my game finished within a week or so. :slight_smile:

Dave [import]uid: 80784 topic_id: 16723 reply_id: 64014[/import]