Refonte pour utiliser le systeme de GUI #112
1 changed files with 3 additions and 0 deletions
|
@ -7,6 +7,7 @@ function TextElement:new(name, fontName, text, x, y, align)
|
|||
self.font = self.assets.fonts[fontName]
|
||||
|
||||
self.align = align
|
||||
self.opacity = 1
|
||||
end
|
||||
|
||||
function TextElement:getText()
|
||||
|
@ -14,7 +15,9 @@ function TextElement:getText()
|
|||
end
|
||||
|
||||
function TextElement:draw()
|
||||
self.font:setColor(1, 1, 1, self.opacity)
|
||||
self.font:draw(self:getText(), self.x, self.y, -1, self.align)
|
||||
love.graphics.setColor(1, 1, 1, 1)
|
||||
end
|
||||
|
||||
return TextElement
|
Loading…
Reference in a new issue