mirror of
https://github.com/brues-code/pfUI.git
synced 2026-10-04 20:50:01 +00:00
chat: add option to change incoming whisper color
This commit is contained in:
+8
-3
@@ -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)"
|
||||
|
||||
@@ -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")
|
||||
|
||||
@@ -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")
|
||||
|
||||
Reference in New Issue
Block a user