add options for time and fps

This commit is contained in:
Eric Mauser
2016-05-21 12:57:43 +02:00
parent 0bf37d7eba
commit c5f71be8aa
2 changed files with 18 additions and 5 deletions
+13
View File
@@ -33,6 +33,19 @@ pfUI:RegisterModule("panel", function ()
pfUI.panel:UpdateZone() pfUI.panel:UpdateZone()
end end
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" -- Update "exp"
function pfUI.panel:UpdateExp () function pfUI.panel:UpdateExp ()
if UnitLevel("player") ~= 60 then if UnitLevel("player") ~= 60 then
+5 -5
View File
@@ -87,13 +87,13 @@ pfUI_config = {
}, },
["panel"] = { ["panel"] = {
["left"] = { ["left"] = {
left = "exp", left = "guild",
center = "friends", center = "durability",
right = "guild", right = "friends",
}, },
["right"] = { ["right"] = {
left = "durability", left = "fps",
center = "gold", center = "time",
right = "gold", right = "gold",
}, },
["other"] = { ["other"] = {