chat: add option to change incoming whisper color

This commit is contained in:
shagu
2016-12-27 14:53:39 +01:00
parent a7355e8ad6
commit bfb9590e69
3 changed files with 10 additions and 3 deletions
+8 -3
View File
@@ -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)"
+1
View File
@@ -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")
+1
View File
@@ -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")