I am currently working on a menu system where I dynamically create panels that I then overlay text on top of to make buttons.
Currently, I am using this code in a loop:
categorySelectButton[i] = display.newRect( 0, 0, buttonWidth, buttonHeight ) categorySelectButton[i]:setFillColor( 0, 0, 0 )
buttonWidth and buttonHeight are variables that I set based on the contentWidth and contentHeight (which changes, using the ultimate config.lua tutorial setup).
What I would like to do is instead use an image instead of a solid color.
Since I won’t know the actual size that the panel will be, what would be the best way to accomplish this?