thirdparty: add option to use chat colors

This commit is contained in:
shagu
2018-01-04 23:17:59 +01:00
parent adc39a2217
commit 34f61e5f70
3 changed files with 27 additions and 0 deletions
+1
View File
@@ -559,6 +559,7 @@ function pfUI:LoadConfig()
pfUI:UpdateConfig("nameplates", nil, "heighthealth", "8")
pfUI:UpdateConfig("nameplates", nil, "heightcast", "8")
pfUI:UpdateConfig("nameplates", nil, "cpdisplay", "0")
pfUI:UpdateConfig("thirdparty", nil, "chatbg", "0")
pfUI:UpdateConfig("thirdparty", "dpsmate", "skin", "0")
pfUI:UpdateConfig("thirdparty", "dpsmate", "dock", "0")
pfUI:UpdateConfig("thirdparty", "swstats", "skin", "0")
+1
View File
@@ -1422,6 +1422,7 @@ pfUI:RegisterModule("gui", function ()
pfUI.gui.tabs.thirdparty.tabs.general = pfUI.gui.tabs.thirdparty.tabs:CreateTabChild(T["Thirdparty"], true)
pfUI.gui.tabs.thirdparty.tabs.general:SetScript("OnShow", function()
if not this.setup then
CreateConfig(this, T["Use Chat Colors for Meters"], C.thirdparty, "chatbg", "checkbox")
CreateConfig(this, T["DPSMate (Skin)"], C.thirdparty.dpsmate, "skin", "checkbox")
CreateConfig(this, T["DPSMate (Dock)"], C.thirdparty.dpsmate, "dock", "checkbox")
CreateConfig(this, T["SWStats (Skin)"], C.thirdparty.swstats, "skin", "checkbox")
+25
View File
@@ -150,8 +150,17 @@ pfUI:RegisterModule("thirdparty", function ()
-- remove titlebar
KLHTM_Gui.title.back:Hide()
KLHTM_SetGuiScale(.9)
CreateBackdrop(KLHTM_Frame)
if C.thirdparty.chatbg == "1" then
local r, g, b, a = strsplit(",", C.chat.global.background)
KLHTM_Frame.backdrop:SetBackdropColor(tonumber(r), tonumber(g), tonumber(b), tonumber(a))
local r, g, b, a = strsplit(",", C.chat.global.border)
KLHTM_Frame.backdrop:SetBackdropBorderColor(tonumber(r), tonumber(g), tonumber(b), tonumber(a))
end
-- theme buttons
local buttons = { "KLHTM_TitleFrameClose", "KLHTM_TitleFrameMinimise",
"KLHTM_TitleFrameMaximise", "KLHTM_TitleFrameOptions", "KLHTM_TitleFramePin",
@@ -265,6 +274,14 @@ pfUI:RegisterModule("thirdparty", function ()
for k, val in pairs(DPSMateSettings["windows"]) do
local frame = _G["DPSMate_"..val["name"]]
CreateBackdrop(frame)
if C.thirdparty.chatbg == "1" then
local r, g, b, a = strsplit(",", C.chat.global.background)
frame.backdrop:SetBackdropColor(tonumber(r), tonumber(g), tonumber(b), tonumber(a))
local r, g, b, a = strsplit(",", C.chat.global.border)
frame.backdrop:SetBackdropBorderColor(tonumber(r), tonumber(g), tonumber(b), tonumber(a))
end
end
end
end
@@ -322,6 +339,14 @@ pfUI:RegisterModule("thirdparty", function ()
CreateBackdrop(SW_BarFrame1)
if C.thirdparty.chatbg == "1" then
local r, g, b, a = strsplit(",", C.chat.global.background)
SW_BarFrame1.backdrop:SetBackdropColor(tonumber(r), tonumber(g), tonumber(b), tonumber(a))
local r, g, b, a = strsplit(",", C.chat.global.border)
SW_BarFrame1.backdrop:SetBackdropBorderColor(tonumber(r), tonumber(g), tonumber(b), tonumber(a))
end
CreateBackdrop(SW_BarSettingsFrameV2)
CreateBackdrop(SW_BarSettingsFrameV2_Title, 0)
CreateBackdrop(SW_BarSettingsFrameV2_Tab1, 0)