optional from layout show category count

This commit is contained in:
Vati
2026-02-28 04:26:36 +04:00
parent 3d22490e15
commit a89ee82a37
5 changed files with 89 additions and 6 deletions
+19 -4
View File
@@ -880,10 +880,16 @@ function BankFrame:DisplayItemsByCategory(bankData, isOtherChar, charName)
displayName = catDef.name
end
-- Set item count
-- Set item count (gated by showCategoryCount setting)
if header.countText then
header.countText:SetText("(" .. numItems .. ")")
header.countText:Show()
local showCount = addon.Modules.DB:GetSetting("showCategoryCount")
if showCount == nil then showCount = true end
if showCount and numItems > 0 then
header.countText:SetText("(" .. numItems .. ")")
header.countText:Show()
else
header.countText:Hide()
end
end
header.fullName = displayName
@@ -994,7 +1000,16 @@ function BankFrame:DisplayItemsByCategory(bankData, isOtherChar, charName)
header:SetPoint("TOPLEFT", itemContainer, "TOPLEFT", x + currentBottomX, y)
header:SetWidth(blockWidth)
header.text:SetText(sec.name)
if header.countText then header.countText:SetText("(" .. numItems .. ")"); header.countText:Show() end
if header.countText then
local showCount = addon.Modules.DB:GetSetting("showCategoryCount")
if showCount == nil then showCount = true end
if showCount and numItems > 0 then
header.countText:SetText("(" .. numItems .. ")")
header.countText:Show()
else
header.countText:Hide()
end
end
header:Show()
local itemY = y - 20