diff --git a/api/config.lua b/api/config.lua index 64f155b3..3635fd88 100644 --- a/api/config.lua +++ b/api/config.lua @@ -575,6 +575,7 @@ function pfUI:LoadConfig() pfUI:UpdateConfig("panel", nil, "hide_rightchat", "0") pfUI:UpdateConfig("panel", nil, "hide_minimap", "0") pfUI:UpdateConfig("panel", nil, "hide_microbar", "0") + pfUI:UpdateConfig("panel", nil, "seconds", "1") pfUI:UpdateConfig("panel", "left", "left", "guild") pfUI:UpdateConfig("panel", "left", "center", "durability") pfUI:UpdateConfig("panel", "left", "right", "friends") @@ -607,6 +608,7 @@ function pfUI:LoadConfig() pfUI:UpdateConfig("panel", "xp", "rep_anchor", "pfChatRight") pfUI:UpdateConfig("panel", "xp", "rep_position", "LEFT") pfUI:UpdateConfig("panel", "xp", "dont_overlap", "0") + pfUI:UpdateConfig("castbar", "player", "hide_blizz", "1") pfUI:UpdateConfig("castbar", "player", "hide_pfui", "0") diff --git a/modules/gui.lua b/modules/gui.lua index 97fd3f36..785b32a6 100644 --- a/modules/gui.lua +++ b/modules/gui.lua @@ -2076,6 +2076,7 @@ pfUI:RegisterModule("gui", "vanilla:tbc", function () CreateConfig(nil, T["Only Count Bagspace On Regular Bags"], C.panel.bag, "ignorespecial", "checkbox") CreateConfig(nil, T["Enable Micro Bar"], C.panel.micro, "enable", "checkbox") CreateConfig(nil, T["Enable 24h Clock"], C.global, "twentyfour", "checkbox") + CreateConfig(nil, T["Enable Seconds"], C.panel, "seconds", "checkbox") CreateConfig(nil, T["Servertime"], C.global, "servertime", "checkbox") CreateConfig(U["panel"], T["Show FPS and Latency Colors"], C.panel, "fpscolors", "checkbox") diff --git a/modules/panel.lua b/modules/panel.lua index 6b6df5fd..198f4178 100644 --- a/modules/panel.lua +++ b/modules/panel.lua @@ -64,6 +64,7 @@ pfUI:RegisterModule("panel", "vanilla:tbc", function() local h, m = GetGameTime() local noon = "AM" local time = "" + local secondsenabled = C.panel.seconds == "1" if C.global.twentyfour == "0" then if C.global.servertime == "1" then if h > 12 then @@ -72,13 +73,21 @@ pfUI:RegisterModule("panel", "vanilla:tbc", function() end time = string.format("%.2d:%.2d %s", h, m, noon) else - time = date("%I:%M:%S %p") + if secondsenabled then + time = date("%I:%M:%S %p") + else + time = date("%I:%M %p") + end end else if C.global.servertime == "1" then time = string.format("%.2d:%.2d", h, m) else - time = date("%H:%M:%S") + if secondsenabled then + time = date("%H:%M:%S") + else + time = date("%H:%M") + end end end pfUI.panel:OutputPanel("time", time, widget.Tooltip, widget.Click)