From c5f71be8aad0a097c704f76a90c0212fba842995 Mon Sep 17 00:00:00 2001 From: Eric Mauser Date: Sat, 21 May 2016 12:57:43 +0200 Subject: [PATCH] add options for time and fps --- modules/panel.lua | 13 +++++++++++++ pfUI.lua | 10 +++++----- 2 files changed, 18 insertions(+), 5 deletions(-) diff --git a/modules/panel.lua b/modules/panel.lua index e23fea77..cc31c73f 100644 --- a/modules/panel.lua +++ b/modules/panel.lua @@ -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 diff --git a/pfUI.lua b/pfUI.lua index 7d118071..e6ebe599 100644 --- a/pfUI.lua +++ b/pfUI.lua @@ -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"] = {