diff --git a/modules/chat.lua b/modules/chat.lua index 8a9584da..15a14ccb 100644 --- a/modules/chat.lua +++ b/modules/chat.lua @@ -514,7 +514,12 @@ pfUI:RegisterModule("chat", function () CHAT_BATTLEGROUND_GET = '[BG]' .. default CHAT_BATTLEGROUND_LEADER_GET = '[BL]' .. default CHAT_SAY_GET = '[S]' .. default - CHAT_WHISPER_GET = '|cffffaaff[W]' .. default + + local cr, cg, cb, ca = pfUI.api.strsplit(",", pfUI_config.chat.global.whisper) + cr, cg, cb = tonumber(cr), tonumber(cg), tonumber(cb) + local wcol = string.format("%02x%02x%02x",cr * 255,cg * 255, cb * 255) + CHAT_WHISPER_GET = '|cff' .. wcol .. '[W]' .. default + CHAT_WHISPER_INFORM_GET = '[W]' .. default CHAT_YELL_GET = '[Y]' .. default @@ -538,8 +543,8 @@ pfUI:RegisterModule("chat", function () text = string.gsub(text, "|Hplayer:(.-)|h%[.-%]|h(.-:-)", "[|Hplayer:%1|h" .. Name .. "|h]" .. "%2") -- make incoming whispers lighter than outgoing - if string.find(text, '|cffffaaff') == 1 then - text = string.gsub(text, "|r", "|cffffaaff") + if string.find(text, '|cff'..wcol) == 1 then + text = string.gsub(text, "|r", "|cff" .. wcol) end local pattern = "%]%s+(.*|Hplayer)" diff --git a/modules/config.lua b/modules/config.lua index efd4a6da..bc8111f8 100644 --- a/modules/config.lua +++ b/modules/config.lua @@ -123,6 +123,7 @@ function pfUI:LoadConfig() pfUI:UpdateConfig("chat", "right", "height", "180") pfUI:UpdateConfig("chat", "global", "custombg", "0") pfUI:UpdateConfig("chat", "global", "background", ".2,.2,.2,.5") + pfUI:UpdateConfig("chat", "global", "whisper", "1,.6,1,1") pfUI:UpdateConfig("nameplates", nil, "showcastbar", "1") pfUI:UpdateConfig("nameplates", nil, "spellname", "0") pfUI:UpdateConfig("nameplates", nil, "showdebuffs", "0") diff --git a/modules/gui.lua b/modules/gui.lua index 5b3f2dbf..7f8faf16 100644 --- a/modules/gui.lua +++ b/modules/gui.lua @@ -934,6 +934,7 @@ pfUI:RegisterModule("gui", function () pfUI.gui:CreateConfig(pfUI.gui.chat, "Right chat height:", pfUI_config.chat.right, "height") pfUI.gui:CreateConfig(pfUI.gui.chat, "Use custom background:", pfUI_config.chat.global, "custombg", "checkbox") pfUI.gui:CreateConfig(pfUI.gui.chat, "Background color:", pfUI_config.chat.global, "background", "color") + pfUI.gui:CreateConfig(pfUI.gui.chat, "Color of incoming whispers:", pfUI_config.chat.global, "whisper", "color") -- nameplates pfUI.gui.nameplates = pfUI.gui:CreateConfigTab("Nameplates")