mirror of
https://github.com/brues-code/pfUI.git
synced 2026-10-03 12:10:01 +00:00
Replace fixed-interval OnUpdate polls with C_Timer/RunNextFrame
Swap hand-rolled per-frame throttles for the modern timer primitives: - turtle-wow: one-shot next-frame defer (self-hiding OnUpdate frame) -> RunNextFrame - panel: clock, combat, and fps widgets -> NewTicker(1); guild roster -> NewTicker(60) - minimap: coordinates text -> NewTicker(0.1) - addonbuttons: one-shot init -> RunNextFrame; 5s button rescan -> NewTicker(5), guarded by IsShown() to preserve the old "paused while hidden" behavior Ticker callbacks reference frames via upvalue since 'this' is unbound outside OnUpdate. Genuine per-frame work (bar fills, fades, drag) and polls already coordinated through pfUI.throttle are left as-is.
This commit is contained in:
@@ -80,10 +80,7 @@ pfUI:RegisterModule("turtle-wow", function ()
|
||||
end)
|
||||
end
|
||||
|
||||
local delay = CreateFrame("Frame")
|
||||
delay:SetScript("OnUpdate", function()
|
||||
this:Hide()
|
||||
|
||||
RunNextFrame(function()
|
||||
-- correct positions of new game menu layout
|
||||
if GameMenuButtonShop and (GameMenuButtonPFUI or GameMenuButtonPFUIAddOns) then
|
||||
-- calculate new offset for the shop button
|
||||
|
||||
Reference in New Issue
Block a user