It looks like you're new here. If you want to get involved, click one of these buttons!
app @ application
local width = app:getContentWidth()
local rawText = "This is a long bit of text to bottom out setLayout once and for all. Some more words to make sure that this is plenty of text to force the function to split it out into multiple boxes."
local myFont = Font.new("arial-12.txt", "arial-12.png")
local fontTable = myFont:layoutText(rawText, width-20, 320, 0, 0, 0, 4, " ")
local testBox
for i, v in ipairs(fontTable.parts) do
testBox = TextField.new(myFont, v.text, "", v)
testBox:setPosition(10, i*20)
stage:addChild(testBox)
end
Likes: hgy29
Comments
The text in my app is variable and likely more than a screen's worth on a phone. I would rather not use scrolling.
I wasn't asking. I was saying i'd found a way to use FontBase:LayoutText.
Perhaps I should have been more explicit:
Are there any examples of how to use the result of FontBase:LayoutText?
Get your CIX on route 109.123.97.120