mirror of
https://github.com/brues-code/pfUI.git
synced 2026-10-04 20:50:01 +00:00
panel: add option to hide seconds on clock
This commit is contained in:
@@ -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")
|
||||
|
||||
@@ -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")
|
||||
|
||||
|
||||
+11
-2
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user