mirror of
https://github.com/brues-code/pfUI.git
synced 2026-11-03 01:16:56 +00:00
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:
+6
-5
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user