mirror of
https://github.com/brues-code/pfUI.git
synced 2026-09-22 07:36:56 +00:00
add options for time and fps
This commit is contained in:
@@ -33,6 +33,19 @@ pfUI:RegisterModule("panel", function ()
|
||||
pfUI.panel:UpdateZone()
|
||||
end
|
||||
end)
|
||||
|
||||
pfUI.panel.clock = CreateFrame("Frame",nil,UIParent)
|
||||
pfUI.panel.clock:SetScript("OnUpdate",function(s,e)
|
||||
if not pfUI.panel.clock.tick then pfUI.panel.clock.tick = GetTime() - 1 end
|
||||
if GetTime() >= pfUI.panel.clock.tick + 1 then
|
||||
pfUI.panel.clock.tick = GetTime()
|
||||
pfUI.panel:OutputPanel("time", date("%H:%M:%S"))
|
||||
local _, _, lag = GetNetStats();
|
||||
local fps = floor(GetFramerate());
|
||||
pfUI.panel:OutputPanel("fps", floor(GetFramerate()) .. " fps & " .. lag .. " ms")
|
||||
end
|
||||
end);
|
||||
|
||||
-- Update "exp"
|
||||
function pfUI.panel:UpdateExp ()
|
||||
if UnitLevel("player") ~= 60 then
|
||||
|
||||
@@ -87,13 +87,13 @@ pfUI_config = {
|
||||
},
|
||||
["panel"] = {
|
||||
["left"] = {
|
||||
left = "exp",
|
||||
center = "friends",
|
||||
right = "guild",
|
||||
left = "guild",
|
||||
center = "durability",
|
||||
right = "friends",
|
||||
},
|
||||
["right"] = {
|
||||
left = "durability",
|
||||
center = "gold",
|
||||
left = "fps",
|
||||
center = "time",
|
||||
right = "gold",
|
||||
},
|
||||
["other"] = {
|
||||
|
||||
Reference in New Issue
Block a user