It looks like you're new here. If you want to get involved, click one of these buttons!
-- main.lua local tf = TextField.new(TTFont.new("sourcesanspro-semibold.ttf", 24), "Hello, World!", true) stage:addChild(tf) tf:setTextColor(0x000000) tf:setPosition(0, 0) |
Comments
so for the top you will need to allocate atleast the text height, in a manner of speaking, to position the text at 0, 0, you will need to set the position at about 0, tf:getHeight()
Author of Learn Lua for iOS Game Development from Apress ( http://www.apress.com/9781430246626 )
Cool Vizify Profile at https://www.vizify.com/oz-apps
Another solution would be to get bounds like