fixed offsets not updating while being edited.

This commit is contained in:
Meow
2026-03-19 08:54:46 +01:00
parent fce239349c
commit 74a92dae07
+23 -5
View File
@@ -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)