mirror of
https://github.com/brues-code/pfUI.git
synced 2026-10-10 07:30:01 +00:00
api: option to disable milliseconds on cooldowns
This commit is contained in:
+4
-1
@@ -1112,9 +1112,12 @@ function pfUI.api.GetColoredTimeString(remaining)
|
||||
elseif remaining > 99 then
|
||||
local r,g,b,a = pfUI.api.GetStringColor(C.appearance.cd.minutecolor)
|
||||
return pfUI.api.rgbhex(r,g,b) .. round(remaining / 60) .. "|rm"
|
||||
elseif remaining <= 5 then
|
||||
elseif remaining <= 5 and pfUI_config.appearance.cd.milliseconds == "1" then
|
||||
local r,g,b,a = pfUI.api.GetStringColor(C.appearance.cd.lowcolor)
|
||||
return pfUI.api.rgbhex(r,g,b) .. string.format("%.1f", round(remaining,1))
|
||||
elseif remaining <= 5 then
|
||||
local r,g,b,a = pfUI.api.GetStringColor(C.appearance.cd.lowcolor)
|
||||
return pfUI.api.rgbhex(r,g,b) .. round(remaining)
|
||||
elseif remaining >= 0 then
|
||||
local r, g, b, a = pfUI.api.GetStringColor(C.appearance.cd.normalcolor)
|
||||
return pfUI.api.rgbhex(r,g,b) .. round(remaining)
|
||||
|
||||
@@ -146,6 +146,7 @@ function pfUI:LoadConfig()
|
||||
pfUI:UpdateConfig("appearance", "cd", "debuffs", "1")
|
||||
pfUI:UpdateConfig("appearance", "cd", "blizzard", "1")
|
||||
pfUI:UpdateConfig("appearance", "cd", "foreign", "0")
|
||||
pfUI:UpdateConfig("appearance", "cd", "milliseconds", "1")
|
||||
pfUI:UpdateConfig("appearance", "castbar", "castbarcolor", ".7,.7,.9,.8")
|
||||
pfUI:UpdateConfig("appearance", "castbar", "channelcolor", ".9,.9,.7,.8")
|
||||
pfUI:UpdateConfig("appearance", "castbar", "texture", "Interface\\AddOns\\pfUI\\img\\bar")
|
||||
|
||||
@@ -1471,6 +1471,7 @@ pfUI:RegisterModule("gui", "vanilla:tbc", function ()
|
||||
end)
|
||||
|
||||
CreateGUIEntry(T["Settings"], T["Cooldown"], function()
|
||||
CreateConfig(U["buff"], T["Show Milliseconds When Timer Runs Out"], C.appearance.cd, "milliseconds", "checkbox")
|
||||
CreateConfig(nil, T["Cooldown Color (Less than 3 Sec)"], C.appearance.cd, "lowcolor", "color")
|
||||
CreateConfig(nil, T["Cooldown Color (Seconds)"], C.appearance.cd, "normalcolor", "color")
|
||||
CreateConfig(nil, T["Cooldown Color (Minutes)"], C.appearance.cd, "minutecolor", "color")
|
||||
|
||||
Reference in New Issue
Block a user