It looks like you're new here. If you want to get involved, click one of these buttons!
local grid=Pixel.new(0x0000FF,1,320,480) stage:addChild(grid) grid:setLayoutParameters{ equalizeCells=false, cellSpacingX=10,cellSpacingY=10, insets=30 } local function makeCell(x,y,w,h,c) local cell=Pixel.new(c or 0x404040,1) grid:addChild(cell) cell:setLayoutConstraints{ fill=1, weightx=1, weighty=1, gridx=x, gridy=y, gridwidth=w,gridheight=h, } cell:setLayoutParameters{ insets=5 } local text=TextField.new(nil,("Cell %dx%d"):format(x,y),{ flags=FontBase.TLF_REF_LINETOP|FontBase.TLF_CENTER|FontBase.TLF_VCENTER,w=1000 }) cell:addChild(text) text:setLayoutConstraints{ fill=1 } text:setTextColor(0xFFFF00) end makeCell(0,0,1,1) makeCell(1,0,1,1) makeCell(2,0,1,2) makeCell(0,1,2,1) makeCell(0,2,3,1) makeCell(0,3,1,1) makeCell(1,3,2,1) |
Likes: MoKaLux, SinisterSoft, rrraptor
Comments
http://forum.giderosmobile.com/discussion/7862/layout-doesnt-work-with-sprite#latest
Likes: SinisterSoft, rrraptor, MoKaLux