View Single Post
06-30-10, 06:45 PM   #29
sacrife
An Onyxian Warder
 
sacrife's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2009
Posts: 384
Originally Posted by Taryble View Post
My auto-position script uses 2 SetPoints, one for the bottom left of the ChatFrame1, and one for the TopRight - the 2nd one ends up setting both the Width and Height, and works fine.
Code:
ChatFrame1:ClearAllPoints()
ChatFrame1:SetPoint("BOTTOMLEFT", 62, 31)
ChatFrame1:SetPoint("TOPRIGHT", "UIParent", "BOTTOMLEFT", 440, 176)
Thankfully, for the 1st setpoint, WoW assumes that UIParent is the parent, and that the corner you're anchoring is being anchored to the same corner of UIParent. Made it a lot shorter to type.

Ok my bad for not explaining well.
If I have my code as a script or as a slash command. It works fine.
However it never saves, so a reloadui/relog resets its everytime.

So thats why I wanted it as an addon and load those settings every time. However nothing happens when I place it in an addon.
__________________

  Reply With Quote