raid: add option to display raid group number

This commit is contained in:
shagu
2025-06-14 18:48:09 +02:00
parent b56eeaba49
commit c30cca2640
3 changed files with 30 additions and 0 deletions
+23
View File
@@ -579,6 +579,19 @@ function pfUI.uf:UpdateConfig()
f.portrait:Hide()
end
if f.group then
if f.config.raidgrouplabel == "1" then
f.group:Show()
else
f.group:Hide()
end
local xoff = tonumber(f.config.grouplabelxoff) or 0
local yoff = tonumber(f.config.grouplabelyoff) or 8
f.group:SetPoint("TOPLEFT", f, "BOTTOMLEFT", xoff, yoff)
f.group:SetPoint("TOPRIGHT", f, "BOTTOMRIGHT", xoff, yoff)
end
if f.config.hitindicator == "1" then
f.feedbackText:SetFont(pfUI.media[f.config.hitindicatorfont], f.config.hitindicatorsize, "OUTLINE")
f.feedbackFontHeight = f.config.hitindicatorsize
@@ -1299,6 +1312,16 @@ function pfUI.uf:CreateUnitFrame(unit, id, config, tick)
f.portrait.model.next = CreateFrame("PlayerModel", nil, nil)
f.feedbackText = f:CreateFontString("pfHitIndicator" .. f.label .. f.id, "OVERLAY", "NumberFontNormalHuge")
if f.label == "raid" and math.mod(f.id, 5) == 1 then
local group = math.ceil(f.id/5)
f.group = f.group or f.hp.bar:CreateFontString("Status", "OVERLAY", "GameFontNormalSmall")
f.group:SetFont(pfUI.font_unit, 8, "OUTLINE")
f.group:SetTextColor(1,1,1,.8)
f.group:SetHeight(16)
f.group:SetText("Group " .. group)
f.group:Hide()
end
f:Hide()
f:UpdateConfig()
f:UpdateFrameSize()