mirror of
https://github.com/brues-code/pfUI.git
synced 2026-09-29 18:56:02 +00:00
raid: add option to display raid group number
This commit is contained in:
@@ -334,6 +334,9 @@ function pfUI:LoadConfig()
|
||||
pfUI:UpdateConfig("unitframes", "raid", "raidlayout", "8x5")
|
||||
pfUI:UpdateConfig("unitframes", "raid", "raidpadding", "3")
|
||||
pfUI:UpdateConfig("unitframes", "raid", "raidfill", "VERTICAL")
|
||||
pfUI:UpdateConfig("unitframes", "raid", "raidgrouplabel", "0")
|
||||
pfUI:UpdateConfig("unitframes", "raid", "grouplabelxoff", "0")
|
||||
pfUI:UpdateConfig("unitframes", "raid", "grouplabelyoff", "8")
|
||||
pfUI:UpdateConfig("unitframes", "raid", "squareaggro", "1")
|
||||
pfUI:UpdateConfig("unitframes", "raid", "squaresize", "6")
|
||||
|
||||
|
||||
@@ -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()
|
||||
|
||||
@@ -1745,6 +1745,10 @@ pfUI:RegisterModule("gui", "vanilla:tbc", function ()
|
||||
CreateConfig(U[c], T["Display Overheal"], C.unitframes[c], "overhealperc", "dropdown", pfUI.gui.dropdowns.uf_overheal)
|
||||
|
||||
if c == "raid" then
|
||||
CreateConfig(U["raid"], T["Display Raid Group Label"], C.unitframes[c], "raidgrouplabel", "checkbox")
|
||||
CreateConfig(U["raid"], T["Group Label X-Offset"], C.unitframes[c], "grouplabelxoff")
|
||||
CreateConfig(U["raid"], T["Group Label Y-Offset"], C.unitframes[c], "grouplabelyoff")
|
||||
|
||||
CreateConfig(U[c], T["Layout"], nil, nil, "header")
|
||||
CreateConfig(U["raid"], T["Raid Padding"], C.unitframes[c], "raidpadding")
|
||||
CreateConfig(U["raid"], T["Raid Layout"], C.unitframes[c], "raidlayout", "dropdown", pfUI.gui.dropdowns.uf_raidlayout)
|
||||
|
||||
Reference in New Issue
Block a user