How to add label/text to image in Corona ?
Hi,
For adding a label/text to an image in Corona, using Lua, use the following code,
local urGroup = display.newGroup()
local urImage = display.newImageRect('sample.png',70,70)
urImage.x = 150
urImage.y = 250
local urText = display.newText( "SampleText", 0, 0, "Helvetica", 22 )
urText:setTextColor( 0, 0, 0, 255 )
-- insert items into group, in the order you want them displayed:
urGroup:insert( urImage )
urGroup:insert( urText )
Link to this post!