function addquad(quadsize)
quad = love.graphics.newQuad( 50, 50, 2, quadsize/2,0.0001,0.0001)
table.insert(quadtable,quad)
for i,v in ipairs(quadtable) do
--TODO: Change quad [b]x position[/b] by -2
end
end
Now I can't find anywhere about how to get and change the quad's position from the table.
Also, is there a more optimal way to do this?
function addquad(quadsize)
quad = love.graphics.newQuad( 50, 50, 2, quadsize/2,0.0001,0.0001)
table.insert(quadtable,quad)
for i,v in ipairs(quadtable) do
-- pull the current values from the quad
local x, y, w, h = v:getViewport()
-- reinsert the new values with a slightly lower X
v:setViewport( x-2, y, w, h )
end
end