Refonte pour utiliser le systeme de GUI #112

Merged
kazhnuz merged 102 commits from feat/gui into master 2022-01-06 19:15:16 +01:00
Showing only changes of commit cf6cd3c7a3 - Show all commits

View file

@ -50,15 +50,15 @@ function CanvasElement:parseOrigin(origin, size)
if (origin == "center") then if (origin == "center") then
return size/2 return size/2
elseif (origin == "end") then elseif (origin == "end") then
return size - self.canvas.padding return size
else else
return origin or self.canvas.padding return origin or 0
end end
end end
function CanvasElement:draw() function CanvasElement:draw()
love.graphics.setColor(1, 1, 1, self.opacity) love.graphics.setColor(1, 1, 1, self.opacity)
love.graphics.draw(self.canvas.texture, self.x,self.y,self.r,self.sx,self.sy,self.ox,self.oy) love.graphics.draw(self.canvas.texture, self.x - self.canvas.padding,self.y - self.canvas.padding,self.r,self.sx,self.sy,self.ox,self.oy)
love.graphics.setColor(1, 1, 1, 1) love.graphics.setColor(1, 1, 1, 1)
end end