From dc89f01ddaa620393586e17379880ba1ae1d908b Mon Sep 17 00:00:00 2001 From: Brues <5278969+brues-code@users.noreply.github.com> Date: Thu, 29 Oct 2026 22:21:58 -0500 Subject: [PATCH] Refresh the FPS & Lag panel tooltip while it is shown The tooltip was built once on enter, so its memory, network and addon figures stayed at the values from that moment. The widget's one-second ticker now rebuilds it while the panel still owns GameTooltip. The tooltip takes its owner as self, not this, so the ticker can call it. --- modules/panel.lua | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/modules/panel.lua b/modules/panel.lua index 27d37d37..c57e8865 100644 --- a/modules/panel.lua +++ b/modules/panel.lua @@ -105,11 +105,12 @@ pfUI:RegisterModule("panel", function() do -- FPS & Lag local widget = CreateFrame("Frame", "pfPanelWidgetLag", UIParent) - local lag, fps, laghex, fpshex, _ - widget.Tooltip = function() + local lag, fps, laghex, fpshex, owner, _ + widget.Tooltip = function(self) + owner = self local active = 0 GameTooltip:ClearLines() - GameTooltip_SetDefaultAnchor(GameTooltip, this) + GameTooltip_SetDefaultAnchor(GameTooltip, self) GameTooltip:AddLine("|cff555555" .. T["Systeminfo"]) for i=1, GetNumAddOns() do if IsAddOnLoaded(i) then @@ -202,6 +203,10 @@ pfUI:RegisterModule("panel", function() end pfUI.panel:OutputPanel("fps", fps .. " " .. T["fps"] .. " & " .. lag .. " " .. T["ms"], widget.Tooltip, widget.Click) + + if owner and GameTooltip:IsOwned(owner) then + widget.Tooltip(owner) + end end) end