Animate unit frame bars with ClassicAPI's SmoothStatusBarMixin

Health and power bars take SmoothStatusBarMixin instead of pfUI's own OnUpdate animation, so the animation no longer runs faster at higher frame rates. The speed dropdown becomes an on/off checkbox, since the mixin's rate is fixed. A new range keeps the bar's filled share, so it doesn't jump before the animation moves on.
This commit is contained in:
Brues
2026-10-31 14:20:20 -05:00
parent 43f90751d6
commit e5a78c8d54
12 changed files with 37 additions and 102 deletions
+1 -20
View File
@@ -222,7 +222,7 @@ function pfUI:LoadConfig()
pfUI:UpdateConfig("unitframes", nil, "ragecolor", "1,.5,.5,1")
pfUI:UpdateConfig("unitframes", nil, "focuscolor", "1,1,.75,1")
pfUI:UpdateConfig("unitframes", nil, "animation_speed", "5")
pfUI:UpdateConfig("unitframes", nil, "animatebars", "1")
pfUI:UpdateConfig("unitframes", nil, "portraitalpha", "0.1")
pfUI:UpdateConfig("unitframes", nil, "always2dportrait", "0")
pfUI:UpdateConfig("unitframes", nil, "portraittexture", "1")
@@ -1143,25 +1143,6 @@ function pfUI:MigrateConfig()
end
end
-- migrating animation_speed (> 3.1.2)
if checkversion(3, 1, 2) then
if tonumber(pfUI_config.unitframes.animation_speed) >= 13 then
pfUI_config.unitframes.animation_speed = "13"
elseif tonumber(pfUI_config.unitframes.animation_speed) >= 8 then
pfUI_config.unitframes.animation_speed = "8"
elseif tonumber(pfUI_config.unitframes.animation_speed) >= 5 then
pfUI_config.unitframes.animation_speed = "5"
elseif tonumber(pfUI_config.unitframes.animation_speed) >= 3 then
pfUI_config.unitframes.animation_speed = "3"
elseif tonumber(pfUI_config.unitframes.animation_speed) >= 2 then
pfUI_config.unitframes.animation_speed = "2"
elseif tonumber(pfUI_config.unitframes.animation_speed) >= 1 then
pfUI_config.unitframes.animation_speed = "1"
else
pfUI_config.unitframes.animation_speed = "5"
end
end
-- migrating legacy buff/debuff naming (> 3.5.0)
if checkversion(3, 5, 0) then
local unitframes = { "player", "target", "focus", "group", "grouptarget", "grouppet", "raid", "ttarget", "pet", "ptarget", "fallback" }