Stako I had this with rBBS aswell.
lua Code:
--so we want to move a frame that is actually hooked to the dragframe
--do make this work we need to trick, because drag functionality ignores the parented frame and used UIParent...we don't want that, because the child would not move with the parent anymore
local calcPoint = function(s)
if s:GetParent():GetName() ~= "UIParent" then
local Hx, Hy = s:GetParent():GetCenter()
local Ox, Oy = s:GetCenter()
if(not Ox) then return end
local scale = s:GetScale()
Hx, Hy = floor(Hx), floor(Hy)
Ox, Oy = floor(Ox*scale), floor(Oy*scale)
local Tx, Ty = (Hx-Ox)*(-1), (Hy-Oy)*(-1)
s:ClearAllPoints()
s:SetPoint("CENTER",s:GetParent(),Tx/scale,Ty/scale)
end
end
You have to dig into the code I guess...
http://code.google.com/p/rothui/sour...BS/core.lua#74
I have a drag frame container and move frames that are parented to to the drag frame container in relative position to the center of the drag frame container.
calcPoint is called OnDragStop and on PLAYER_LOGIN event (because the position of saved frames in layout-local.txt needs to be rechecked on loadup).