From 74a92dae07b624e130725add4555e13284945f47 Mon Sep 17 00:00:00 2001 From: Meow <30401521+me0wg4ming@users.noreply.github.com> Date: Thu, 19 Mar 2026 08:54:46 +0100 Subject: [PATCH] fixed offsets not updating while being edited. --- modules/gui.lua | 28 +++++++++++++++++++++++----- 1 file changed, 23 insertions(+), 5 deletions(-) diff --git a/modules/gui.lua b/modules/gui.lua index 186537c5..80cb5091 100644 --- a/modules/gui.lua +++ b/modules/gui.lua @@ -18,10 +18,28 @@ pfUI:RegisterModule("gui", "vanilla:tbc", function () U = setmetatable({}, { __index = function(tab,key) local ufunc - if type(pfUI[key]) == "table" and pfUI[key].UpdateConfig then - ufunc = function() return pfUI[key]:UpdateConfig() end - elseif pfUI.uf and type(pfUI.uf[key]) == "table" and pfUI.uf[key].UpdateConfig then - ufunc = function() return pfUI.uf[key]:UpdateConfig() end + -- search pfUI.uf.frames first - these are the active unit frames + if pfUI.uf and pfUI.uf.frames then + for _, f in ipairs(pfUI.uf.frames) do + if f.label == key and f.id == "" then + ufunc = function() + for _, fr in ipairs(pfUI.uf.frames) do + if fr.label == key then + pfUI.uf.UpdateConfig(fr) + end + end + end + break + end + end + end + -- fallback to pfUI[key] for non-unitframe modules + if not ufunc then + if type(pfUI[key]) == "table" and pfUI[key].UpdateConfig then + ufunc = function() return pfUI[key]:UpdateConfig() end + elseif pfUI.uf and type(pfUI.uf[key]) == "table" and pfUI.uf[key].UpdateConfig then + ufunc = function() return pfUI.uf[key]:UpdateConfig() end + end end if ufunc then rawset(tab,key,ufunc) @@ -2922,4 +2940,4 @@ pfUI:RegisterModule("gui", "vanilla:tbc", function () end end) end -end) +end) \ No newline at end of file