actionbar: add option to set custom cooldown size

This commit is contained in:
shagu
2020-06-21 18:49:23 +02:00
parent d5a9869417
commit 09cd6478e3
3 changed files with 6 additions and 0 deletions
+1
View File
@@ -502,6 +502,7 @@ function pfUI:LoadConfig()
pfUI:UpdateConfig("bars", nil, "count_color", ".2,1,.8,1")
pfUI:UpdateConfig("bars", nil, "bind_size", "8")
pfUI:UpdateConfig("bars", nil, "bind_color", "1,1,0,1")
pfUI:UpdateConfig("bars", nil, "cd_size", "12")
pfUI:UpdateConfig("totems", nil, "direction", "HORIZONTAL")
pfUI:UpdateConfig("totems", nil, "iconsize", "26")
+4
View File
@@ -897,6 +897,8 @@ pfUI:RegisterModule("actionbar", "vanilla:tbc", function ()
local bind_size = tonumber(C.bars.bind_size)
local bind_color = { strsplit(",", C.bars.bind_color) }
local cd_size = tonumber(C.bars.cd_size)
local showempty = C.bars["bar"..bar].showempty
local showmacro = C.bars["bar"..bar].showmacro
local showkybind = C.bars["bar"..bar].showkeybind
@@ -906,6 +908,7 @@ pfUI:RegisterModule("actionbar", "vanilla:tbc", function ()
if macro_size == 0 then macro_size = 1 end
if count_size == 0 then macro_size = 1 end
if bind_size == 0 then macro_size = 1 end
if cd_size == 0 then cd_size = nil end
local button_name = "pfActionBar" .. barnames[bar] .. "Button" .. button
@@ -941,6 +944,7 @@ pfUI:RegisterModule("actionbar", "vanilla:tbc", function ()
-- cooldown
f.cd = CreateFrame(COOLDOWN_FRAME_TYPE, f:GetName() .. "Cooldown", f, "CooldownFrameTemplate")
f.cd.pfCooldownType = "NOGCD"
f.cd.pfCooldownSize = cd_size
-- icon
f.icon = f:CreateTexture(button_name .. "Icon", "BACKGROUND")
+1
View File
@@ -1858,6 +1858,7 @@ pfUI:RegisterModule("gui", "vanilla:tbc", function ()
CreateConfig(U["bars"], T["Item Count Text Color"], C.bars, "count_color", "color")
CreateConfig(U["bars"], T["Keybind Text Size"], C.bars, "bind_size")
CreateConfig(U["bars"], T["Keybind Text Color"], C.bars, "bind_color", "color")
CreateConfig(nil, T["Cooldown Text Size"], C.bars, "cd_size")
CreateConfig(nil, T["Auto Paging"], nil, nil, "header")
CreateConfig(U["bars"], T["Switch Pages On Meta Key Press"], C.bars, "pagemaster", "checkbox")