Originally Posted by Phanx
You may want to look at LibJostle to see how it handles doing this without breaking things.
|
Ok you are a life saver seriously. No moving anything now all I needed to do was add the LibJostle and then change my code to:
Code:
function Datatext:SetDataPanel()
if db.location ~= "top" then
Datapanel:SetPoint("BOTTOM", UIParent, 0, 0)
Datapanel:SetWidth(1200)
if jostle then
jostle:RegisterBottom(Datapanel)
end
else
Datapanel:SetPoint("TOP", UIParent, 0, 0)
Datapanel:SetWidth(SCREEN_WIDTH)
if jostle then
jostle:RegisterTop(Datapanel)
end
end
end
EDIT:
And BAM!!!!!!!!!!! everything moves without any problems. Top or Bottom.
Thanks again for saving my arse.
/EDIT
EDIT#2:
Not sure why, im not getting any errors from bug sack but my target frame keep wondering over above my Playerframe (see screenshot) it only seems to happen after I get in combat (as something attacks me).
LibJostle-3.0 that I'm using.
Datatext.lua this is the current datatext file im using.
The only think I change was added the LibJostle to my addon and the little code.
If I disable the datatex in the options it does not move my target frame.
Coke
Edit#3
Its accually the Lib it self cause even without my datapanel the target frame moves over the player frame.
Coke