Hey guys. This is my first attempt at an addon, and it's going pretty awesome except for this little hang up. I have a small movable frame that i want to grow to the right no matter where it is on the screen. Yes, obviously i'm a little bit anal lol, but i do have a button on the left that changes the size of the frame, and its annoying that it gets moved away from my mouse whenever i click it. So anyways, i was told elsewhere that the problem is my anchor point and that after StopMovingOrSizing() i need to re-anchor my frame somewhere left. Which is fine...however doing so results in some wierd bugs. It resizes, and grows just as it should when its anywhere to the left of the screen, and anywhere center, however when i move it to the right side of the screen, my backdrop no longer changes size at all. Also of note is that GetWidth() returns the correct value. Is there any reason for this, is there anything i can do? It moves around via:
Conveniently, getpoint(1) just before StopMovingOrSizing(), seems to have all the right info for anchoring TOPLEFT.
lua Code:
function GoldTracker_OnMouseDown()
GoldTracker_MainFrame:StartMoving()
end
function GoldTracker_OnMouseUp()
local gtpoint, gtrelativeTo, gtrelativePoint, gtxOfs, gtyOfs = GoldTracker_MainFrame:GetPoint(1)
GoldTracker_MainFrame:StopMovingOrSizing()
GoldTracker_MainFrame:SetPoint(gtpoint, gtxOfs, gtyOfs)
end