usage is as described in the sample left in this forum .. but if it helps .. here goes(for TextWrap):
***************************** function Author:AuthorBio() local retval = Sprite.new() local font = TTFont.new("fonts/kaiu.ttf", 18) local authorBio = TextWrap.new(self.rowData[1]["bio"], 440, justify, 1, font)
print("Authors Bio info is: "..self.rowData[1]["bio"])
************************* function Author:AuthorBio() local retval = Sprite.new() local font = TTFont.new("fonts/kaiu.ttf", 18) local authorBio = TextWrap2.new(self.rowData[1]["bio"], 440, 600, 1, font)
print("Authors Bio info is: "..self.rowData[1]["bio"])
I just got a TextWrap that works fine without modification from the Gideros Github .. hope its the latest version, there no indication of date. it works well, except for 'justify' is not aligning the text on both sides .. only the left.
Comments
*****************************
function Author:AuthorBio()
local retval = Sprite.new()
local font = TTFont.new("fonts/kaiu.ttf", 18)
local authorBio = TextWrap.new(self.rowData[1]["bio"], 440, justify, 1, font)
print("Authors Bio info is: "..self.rowData[1]["bio"])
authorBio:setPosition(300,35)
authorBio:setTextColor(0xffffff)
retval:addChild(authorBio)
return retval
end
*****************************
Oddly enough a previous version of TextWrap (June 21, 2012 file) worked ok .. after removing any 'print's using 'getTime()' .. using this code
*************************
function Author:AuthorBio()
local retval = Sprite.new()
local font = TTFont.new("fonts/kaiu.ttf", 18)
local authorBio = TextWrap2.new(self.rowData[1]["bio"], 440, 600, 1, font)
print("Authors Bio info is: "..self.rowData[1]["bio"])
authorBio:setPosition(300,35)
authorBio:setTextColor(0xffffff)
retval:addChild(authorBio)
return retval
end
*************************
This one just doesn't display. No error indicators popup tho. And the print statement works fine.
it works well, except for 'justify' is not aligning the text on both sides .. only the left.