View Single Post
12-19-21, 07:22 PM   #6
SDPhantom
A Pyroguard Emberseer
 
SDPhantom's Avatar
AddOn Author - Click to view addons
Join Date: Jul 2006
Posts: 2,327
I'd suggest hooking or rewriting StaticPopup_SetUpAnchor().

The popup frames act as a frame pool, you'll either have them show at random locations or have your anchor overwritten if you statically set one of them.

For example, this uses a secure hook to change the position of the root frame only. Others will spawn under it as is default behavior.
Lua Code:
  1. hooksecurefunc("StaticPopup_SetUpAnchor",function(frame,i)
  2.     if not StaticPopup_DisplayedFrames[i-1] then
  3.         frame:ClearAllPoints();
  4.         frame:SetPoint("TOP",UIParent,"TOP",0,-135);
  5.     end
  6. end);
__________________
WoWInterface AddOns
"All I want is a pretty girl, a decent meal, and the right to shoot lightning at fools."
-Anders (Dragon Age: Origins - Awakening)

Last edited by SDPhantom : 12-19-21 at 07:31 PM.
  Reply With Quote