Refonte pour utiliser le systeme de GUI #112
1 changed files with 3 additions and 3 deletions
|
@ -50,15 +50,15 @@ function CanvasElement:parseOrigin(origin, size)
|
|||
if (origin == "center") then
|
||||
return size/2
|
||||
elseif (origin == "end") then
|
||||
return size - self.canvas.padding
|
||||
return size
|
||||
else
|
||||
return origin or self.canvas.padding
|
||||
return origin or 0
|
||||
end
|
||||
end
|
||||
|
||||
function CanvasElement:draw()
|
||||
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)
|
||||
end
|
||||
|
||||
|
|
Loading…
Reference in a new issue