First post on forum. I was a previous DragonFire user (released 2 games using it).
Now I’m exploring corona.
I’ve 1 problem here. I’ve done the research but couldn’t find anything i need.
Basically I’ve created a pool of buttons for my level selection menu.
local levelSelected = function()
end
local createLevelSelectionGUI = function(levelPack)
for i=0,4 do
for j=0,2 do
local tempLevelBtn = ui.newButton{
default = "btnLevel1.png",
over = "btnLevel2.png",
onRelease = levelSelected,
text = string.format("%u", levelCount),
emboss = true
}
end
end
end
As you can see all these buttons link to levelSelected function onRelease event.
My idea is to access the text property of the button clicked and load the appropriate level.
But how can I access the source button when my levelSelected function is being called?
Thanks [import]uid: 7995 topic_id: 5501 reply_id: 305501[/import]