feat(inferium-gui): add basic titleFn

This commit is contained in:
Guillaume ARM 2024-05-23 22:27:18 +02:00
parent 69b31f24a9
commit 8d4768813b

View File

@ -1,7 +1,20 @@
local CountersSelector = require('libs/ui/CountersSelector')
local counterMax = 8
local config = {
counterMax = 8
counterMax = counterMax,
titleFn = function(countersMap)
local total = 0;
for _, counterPayload in pairs(countersMap) do
if counterPayload and counterPayload.count then
total = total + counterPayload.count
end
end
return "| " .. total .. '/' .. counterMax .. ' used farmlands' .. " |"
end
}
local countersMap = {