Hello guys,
Do you guys know how to set up a Dynamic newButton? I’ve tried, but I’m stuck on the “onEvent” of the button parameters my code goes like this:
local t= totalActiveFile --this is the dynamic part where in a query gives its value local topPos = 80 for i = 1 , t do local slotName = ("saveSlot" .. i) slotName = widget.newButton { left = 50, top =topPos , width = 230, height = 100, defaultFile = "images/loadslot.png", overFile = "images/loadslotpress.png", id = ("load\_slot" .. i), onEvent = loadGame .. i, } button:insert(slotName) topPos = topPos + 100 end
If you have a suggestion or idea, please let me know.
Thank you for your time and patience,
Jam