Timer bars: buffwatch, loot roll, infobox and five-second rule drain from duration objects

Each bar hands its fill to StatusBar:SetTimerDuration instead of a per-frame
SetValue. Buffwatch's time text moves to a duration text binding holding the
cooldown formatter, now exposed as GetTimeFormatter (replacing
GetColoredTimeString, whose only caller this was). The five-second rule's
overlay style becomes a color-filled StatusBar too, so both styles share one
path; energytick's OnUpdate keeps only the tick spark.
This commit is contained in:
Brues
2026-11-02 16:12:15 -06:00
parent 9f5ebf367f
commit a219bd13dc
5 changed files with 68 additions and 68 deletions
+6 -5
View File
@@ -196,9 +196,10 @@ function pfUI.api.GetAuraTimer(duration, expirationTime)
return start, dur
end
-- [ GetColoredTimeString ] --
-- 'remaining' [number] the time in seconds that should be converted
-- return [string] the time as cooldown numbers show it
function pfUI.api.GetColoredTimeString(remaining)
return GetFormatter():FormatNumber(remaining)
-- [ GetTimeFormatter ] --
-- The formatter cooldown numbers use, for other timers to show time the same
-- way. Hold it rather than a copy: a settings change updates it in place.
-- return [formatter] a NumericRuleFormatter
function pfUI.api.GetTimeFormatter()
return GetFormatter()
end