Hi,
I am Fabio, an italian guy…im on my first steps with Corona and app world, so be patience with me
Anyway i need to recreate a table like in the image attached
So a table with 4 columns and 5 rows…with one black rect on each row
this is my code…someone can help me??
thanks in advance
local tile local tileRowGroup = display.newGroup() local \_W = display.contentWidth local \_H = display.contentHeight local numeroDiRighe = 5 local numeroDiColonne = 4 local larghezzaTile = display.contentWidth/numeroDiColonne local altezzaTile = display.contentHeight/numeroDiRighe --tile = display.newRect( 80, 96, display.contentWidth/4, display.contentHeight/5 ) --tile:setFillColor( 255,255,255 ) --tile:setStrokeColor( 200,240,34 ) function loadRow() local piazzamentoTile = {x=\_W-(larghezzaTile\*numeroDiColonne)+(larghezzaTile/2), y=\_H-(altezzaTile\*numeroDiRighe)+(altezzaTile/2)} local random = math.random( 1, 3 ) for righe = 0, numeroDiRighe - 1 do for colonne =0, numeroDiColonne - 1 do tileXX = piazzamentoTile.x + (colonne \* larghezzaTile) tileYY = piazzamentoTile.y + (righe \* altezzaTile) --creazione dei mattoni tile = display.newRect( tileXX, tileYY, larghezzaTile, altezzaTile ) tile.name = "tile" tile.strokeWidth = 2 tile:setFillColor( 255,255,255 ) tile:setStrokeColor( 0, 0, 0 ) --physics.addBody( tile, "static", {density=1, friction=0, bounce = 0} ) --tileRowGroup:insert(tile) end end end