mirror of
https://github.com/brues-code/pfUI.git
synced 2026-09-28 02:16:02 +00:00
chat: use colorpicker for timestamp
This commit is contained in:
+4
-1
@@ -553,7 +553,10 @@ pfUI:RegisterModule("chat", function ()
|
||||
if pfUI_config.chat.text.time == "1" then
|
||||
local left = string.sub(pfUI_config.chat.text.timebracket, 1, 1)
|
||||
local right = string.sub(pfUI_config.chat.text.timebracket, 2, 2)
|
||||
text = "|cff" .. pfUI_config.chat.text.timecolor .. left .. date(pfUI_config.chat.text.timeformat) .. right .. "|r " .. text
|
||||
|
||||
local r,g,b,a = strsplit(",", pfUI_config.chat.text.timecolor)
|
||||
local chex = string.format("%02x%02x%02x%02x", a*255, r*255, g*255, b*255)
|
||||
text = "|c" .. chex .. left .. date(pfUI_config.chat.text.timeformat) .. right .. "|r " .. text
|
||||
end
|
||||
|
||||
getglobal("ChatFrame"..i).HookAddMessage(frame, text, unpack(arg))
|
||||
|
||||
+1
-1
@@ -84,7 +84,7 @@ function pfUI:LoadConfig()
|
||||
pfUI:UpdateConfig("chat", "text", "time", "0")
|
||||
pfUI:UpdateConfig("chat", "text", "timeformat", "%H:%M:%S")
|
||||
pfUI:UpdateConfig("chat", "text", "timebracket", "[]")
|
||||
pfUI:UpdateConfig("chat", "text", "timecolor", "dddddd")
|
||||
pfUI:UpdateConfig("chat", "text", "timecolor", ".8,.8,.8,1")
|
||||
pfUI:UpdateConfig("chat", "left", "width", "400")
|
||||
pfUI:UpdateConfig("chat", "left", "height", "180")
|
||||
pfUI:UpdateConfig("chat", "right", "width", "400")
|
||||
|
||||
+1
-1
@@ -763,7 +763,7 @@ pfUI:RegisterModule("gui", function ()
|
||||
pfUI.gui:CreateConfig(pfUI.gui.chat, "Timestamp in chat:", pfUI_config.chat.text, "time", "checkbox")
|
||||
pfUI.gui:CreateConfig(pfUI.gui.chat, "Timestamp format:", pfUI_config.chat.text, "timeformat")
|
||||
pfUI.gui:CreateConfig(pfUI.gui.chat, "Timestamp brackets:", pfUI_config.chat.text, "timebracket")
|
||||
pfUI.gui:CreateConfig(pfUI.gui.chat, "Timestamp color:", pfUI_config.chat.text, "timecolor")
|
||||
pfUI.gui:CreateConfig(pfUI.gui.chat, "Timestamp color:", pfUI_config.chat.text, "timecolor", "color")
|
||||
pfUI.gui:CreateConfig(pfUI.gui.chat, "Left chat width:", pfUI_config.chat.left, "width")
|
||||
pfUI.gui:CreateConfig(pfUI.gui.chat, "Left chat height:", pfUI_config.chat.left, "height")
|
||||
pfUI.gui:CreateConfig(pfUI.gui.chat, "Right chat width:", pfUI_config.chat.right, "width")
|
||||
|
||||
Reference in New Issue
Block a user