mirror of
https://github.com/brues-code/pfUI.git
synced 2026-10-07 06:00:00 +00:00
buff: add buff frames
This commit is contained in:
+3
-3
@@ -710,13 +710,13 @@ function pfUI.api.GetColoredTimeString(remaining)
|
||||
if not remaining then return "" end
|
||||
if remaining > 99 * 60 * 60 then
|
||||
local r,g,b,a = pfUI.api.GetStringColor(C.appearance.cd.daycolor)
|
||||
return "|cff" .. string.format("%02x%02x%02x", r*255, g*255, b*255) .. round(remaining / 60 / 60 / 24) .. "d"
|
||||
return "|cff" .. string.format("%02x%02x%02x", r*255, g*255, b*255) .. round(remaining / 60 / 60 / 24) .. "|rd"
|
||||
elseif remaining > 99 * 60 then
|
||||
local r,g,b,a = pfUI.api.GetStringColor(C.appearance.cd.hourcolor)
|
||||
return "|cff" .. string.format("%02x%02x%02x", r*255, g*255, b*255) .. round(remaining / 60 / 60) .. "h"
|
||||
return "|cff" .. string.format("%02x%02x%02x", r*255, g*255, b*255) .. round(remaining / 60 / 60) .. "|rh"
|
||||
elseif remaining > 99 then
|
||||
local r,g,b,a = pfUI.api.GetStringColor(C.appearance.cd.minutecolor)
|
||||
return "|cff" .. string.format("%02x%02x%02x", r*255, g*255, b*255) .. round(remaining / 60) .. "m"
|
||||
return "|cff" .. string.format("%02x%02x%02x", r*255, g*255, b*255) .. round(remaining / 60) .. "|rm"
|
||||
elseif remaining <= 5 then
|
||||
local r,g,b,a = pfUI.api.GetStringColor(C.appearance.cd.lowcolor)
|
||||
return "|cff" .. string.format("%02x%02x%02x", r*255, g*255, b*255) .. round(remaining)
|
||||
|
||||
@@ -44,6 +44,15 @@ function pfUI:LoadConfig()
|
||||
pfUI:UpdateConfig("global", nil, "autorepair", "0")
|
||||
pfUI:UpdateConfig("gui", nil, "reloadmarker", "0")
|
||||
|
||||
pfUI:UpdateConfig("buffs", nil, "buffs", "1")
|
||||
pfUI:UpdateConfig("buffs", nil, "debuffs", "1")
|
||||
pfUI:UpdateConfig("buffs", nil, "weapons", "1")
|
||||
pfUI:UpdateConfig("buffs", nil, "size", "24")
|
||||
pfUI:UpdateConfig("buffs", nil, "spacing", "5")
|
||||
pfUI:UpdateConfig("buffs", nil, "rowsize", "16")
|
||||
pfUI:UpdateConfig("buffs", nil, "textinside", "0")
|
||||
pfUI:UpdateConfig("buffs", nil, "fontsize", "-1")
|
||||
|
||||
pfUI:UpdateConfig("appearance", "border", "background", "0,0,0,1")
|
||||
pfUI:UpdateConfig("appearance", "border", "color", "0.2,0.2,0.2,1")
|
||||
pfUI:UpdateConfig("appearance", "border", "default", "3")
|
||||
@@ -796,5 +805,12 @@ function pfUI:MigrateConfig()
|
||||
end
|
||||
end
|
||||
|
||||
-- migrating old buff settings (> 3.6.1)
|
||||
if checkversion(3, 6, 1) then
|
||||
pfUI_config.buffs.weapons = pfUI_config.global.hidewbuff == "1" and "0" or "1"
|
||||
pfUI_config.buffs.buffs = pfUI_config.global.hidebuff == "1" and "0" or "1"
|
||||
pfUI_config.buffs.debuffs = pfUI_config.global.hidebuff == "1" and "0" or "1"
|
||||
end
|
||||
|
||||
pfUI_config.version = pfUI.version.string
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user