sonic-radiance/sonic-radiance.love/birb/modules/gui/elements/counter.lua
2021-08-30 14:11:08 +02:00

13 lines
No EOL
450 B
Lua

local Parent = require "birb.modules.gui.elements.variable"
local CounterElement = Parent:extend()
function CounterElement:new(name, fontName, object, varName, nbrs, x, y, align, depth)
CounterElement.super.new(self, name, fontName, object, varName, x, y, align, depth)
self.nbrs = nbrs or 0
end
function CounterElement:getText()
return utils.math.numberToString(CounterElement.super.getText(self), self.nbrs)
end
return CounterElement