Give pfUI its own EventRegistry and move event-only frames onto it

pfUI.events was a bare CallbackRegistry for pfUI's custom events. Build it
from ClassicAPI's EventRegistry instead, so the same object also takes game
events through RegisterFrameEventAndCallback, sharing one frame for all of
them.

Move the frames that existed only to listen for a few events onto it:
libspell, focus, pixelperfect, innervatecall, loothistory, unusable,
equipmentmanager (bank + window refresh), the actionbar grid, updatenotify,
turtle-wow's steady shot, nampower's spell queue, superwow's group tracking
and unitxp's notifications, plus newitem and mapreveal, which used the
global EventRegistry. Handlers take their payload as arguments instead of
the event/arg globals, and the per-frame PLAYER_LOGOUT teardown goes away,
since the registry unregisters its frame on logout.
This commit is contained in:
Brues
2026-10-30 12:37:56 -05:00
parent b0f9b7b993
commit f37ea00226
16 changed files with 101 additions and 166 deletions
+1 -3
View File
@@ -33,9 +33,7 @@ pfUI:RegisterModule("pixelperfect", function ()
-- pixelperfect: native UIScale listener
if tonumber(C.global.pixelperfect) > 0 then
local f = CreateFrame("Frame")
f:RegisterEvent("PLAYER_ENTERING_WORLD")
f:SetScript("OnEvent", pixelperfect)
pfUI.events:RegisterFrameEventAndCallback("PLAYER_ENTERING_WORLD", pixelperfect)
pixelperfect()
end