2022-08-12 10:50:42 +02:00
|
|
|
local Parent = require "framework.modules.gui.elements.variable"
|
2021-12-04 13:18:54 +01:00
|
|
|
local CounterElement = Parent:extend()
|
|
|
|
|
|
|
|
function CounterElement:new(name, fontName, object, varName, nbrs, x, y, align)
|
|
|
|
CounterElement.super.new(self, name, fontName, object, varName, x, y, align)
|
|
|
|
self.nbrs = nbrs or 0
|
|
|
|
end
|
|
|
|
|
|
|
|
function CounterElement:getText()
|
|
|
|
return utils.math.numberToString(CounterElement.super.getText(self), self.nbrs)
|
|
|
|
end
|
|
|
|
|
|
|
|
return CounterElement
|