2021-08-30 14:11:08 +02:00
|
|
|
local Parent = require "birb.modules.gui.elements.variable"
|
|
|
|
local CounterElement = Parent:extend()
|
|
|
|
|
2021-08-31 10:56:43 +02:00
|
|
|
function CounterElement:new(name, fontName, object, varName, nbrs, x, y, align)
|
|
|
|
CounterElement.super.new(self, name, fontName, object, varName, x, y, align)
|
2021-08-30 14:11:08 +02:00
|
|
|
self.nbrs = nbrs or 0
|
|
|
|
end
|
|
|
|
|
|
|
|
function CounterElement:getText()
|
|
|
|
return utils.math.numberToString(CounterElement.super.getText(self), self.nbrs)
|
|
|
|
end
|
|
|
|
|
|
|
|
return CounterElement
|