buff: add buff frames

This commit is contained in:
shagu
2018-03-26 18:26:33 +02:00
parent cdb9d876a7
commit 8fb5f3a10d
5 changed files with 254 additions and 118 deletions
+3 -3
View File
@@ -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)
+16
View File
@@ -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