mirror of
https://github.com/brues-code/pfUI.git
synced 2026-10-07 14:10:01 +00:00
unitframes: move buffs on custom portrait sizes
This commit is contained in:
+16
-6
@@ -776,9 +776,14 @@ function pfUI.uf:UpdateConfig()
|
|||||||
af = "TOPRIGHT"
|
af = "TOPRIGHT"
|
||||||
end
|
end
|
||||||
|
|
||||||
f.buffs[i]:SetPoint(af, f, f.config.buffs,
|
local anchor = f.config.portraitheight ~= "-1" and f.hp or f
|
||||||
invert_v * (i-1-row*perrow)*(2*default_border + f.config.buffsize + 1),
|
if anchor == f.hp and (f.config.buffs == "BOTTOMLEFT" or f.config.buffs == "BOTTOMRIGHT") then
|
||||||
invert_h * (row*(2*default_border + f.config.buffsize + 1) + (2*default_border + 1)))
|
anchor = f.power
|
||||||
|
end
|
||||||
|
local multiply = C.appearance.border.force_blizz == "1" and 1 or 2
|
||||||
|
f.buffs[i]:SetPoint(af, anchor, f.config.buffs,
|
||||||
|
invert_v * (i-1-row*perrow)*(multiply*default_border + f.config.buffsize + 1),
|
||||||
|
invert_h * (row*(multiply*default_border + f.config.buffsize + 1) + (multiply*default_border + 1)))
|
||||||
|
|
||||||
f.buffs[i]:SetWidth(f.config.buffsize)
|
f.buffs[i]:SetWidth(f.config.buffsize)
|
||||||
f.buffs[i]:SetHeight(f.config.buffsize)
|
f.buffs[i]:SetHeight(f.config.buffsize)
|
||||||
@@ -1578,9 +1583,14 @@ function pfUI.uf:RefreshUnit(unit, component)
|
|||||||
local row = floor((i-1) / unit.config.debuffperrow)
|
local row = floor((i-1) / unit.config.debuffperrow)
|
||||||
|
|
||||||
if reposition then
|
if reposition then
|
||||||
unit.debuffs[i]:SetPoint(af, unit, unit.config.debuffs,
|
local anchor = unit.config.portraitheight ~= "-1" and unit.hp or unit
|
||||||
invert_v * (i-1-row*perrow)*(2*default_border + unit.config.debuffsize + 1),
|
if anchor == unit.hp and (unit.config.debuffs == "BOTTOMLEFT" or unit.config.debuffs == "BOTTOMRIGHT") then
|
||||||
invert_h * ((row+buffrow)*(2*default_border + unit.config.debuffsize + 1) + (2*default_border + 1)))
|
anchor = unit.power
|
||||||
|
end
|
||||||
|
local multiply = C.appearance.border.force_blizz == "1" and 1 or 2
|
||||||
|
unit.debuffs[i]:SetPoint(af, anchor, unit.config.debuffs,
|
||||||
|
invert_v * (i-1-row*perrow)*(multiply*default_border + unit.config.debuffsize + 1),
|
||||||
|
invert_h * ((row+buffrow)*(multiply*default_border + unit.config.debuffsize + 1) + (multiply*default_border + 1)))
|
||||||
end
|
end
|
||||||
|
|
||||||
if unit.label == "player" then
|
if unit.label == "player" then
|
||||||
|
|||||||
Reference in New Issue
Block a user