Thread Tools Display Modes
04-16-10, 05:15 PM   #1
eddiemars
A Cyclonian
 
eddiemars's Avatar
AddOn Author - Click to view addons
Join Date: Aug 2009
Posts: 43
Minimap Tracking Icon

Hello everyone. I have been chasing my tail on this one for too long now, I was wondering if perhaps anyone else has run into this? Or maybe just can see where I am going wrong.

I am wanting to do the following but for the Minimap Tracking Icon/Button.
Code:
		MiniMapMailFrame:RegisterForDrag("LeftButton")
		MiniMapMailFrame:SetClampedToScreen(true)
		MiniMapMailFrame:SetMovable(true)
		MiniMapMailFrame:SetScript("OnDragStart", function(self) if IsAltKeyDown() then self:StartMoving() end end)
		MiniMapMailFrame:SetScript("OnDragStop", function(self) if IsAltKeyDown() then self:StopMovingOrSizing() end end)
This code works perfect for the mail icon. When I try it for the tracking Icon I have used the Frame name "MiniMapTracking", "MiniMapTrackingButton", and "MiniMapTrackingIcon"; "MiniMapTrackingButton" working the best, as though it does not move the whole frame it moves the part that is interactive.
Here's a screenshot of when I first mouseover it.
http://eddiemars.com/SStry3.jpeg
Now I am Alt clicking to drag it.
http://eddiemars.com/SStry2.jpeg
And Oh, Icon is so far away. SO then I try adding:
Code:
		MiniMapTrackingIcon:SetPoint("BOTTOMLEFT", MiniMapTrackingButton)
And I then get this happening while alt + dragging:
http://eddiemars.com/SStry4.jpeg
This get's indefinitely bigger and smaller depending where it is dragged. I have tried a lot of different stuff to try and 'unhook' that corner to no avail... different anchor points, different combinations of frame name... Anyone have any ideas? Or maybe you know of an addon that seems to do this well I could check out for reference?

Thanks,

Eddie
__________________
MAGICAL CRAWDAD APPROVED:

Last edited by eddiemars : 04-16-10 at 06:00 PM.
  Reply With Quote
04-16-10, 08:38 PM   #2
Seerah
Fishing Trainer
 
Seerah's Avatar
WoWInterface Super Mod
Featured
Join Date: Oct 2006
Posts: 10,860
A frame can be anchored to multiple points. You're adding another point, hence the resizing issue. You need to call frame:ClearAllPoints() first.
__________________
"You'd be surprised how many people violate this simple principle every day of their lives and try to fit square pegs into round holes, ignoring the clear reality that Things Are As They Are." -Benjamin Hoff, The Tao of Pooh

  Reply With Quote
04-17-10, 01:23 PM   #3
eddiemars
A Cyclonian
 
eddiemars's Avatar
AddOn Author - Click to view addons
Join Date: Aug 2009
Posts: 43
I've tried calling that on a couple different frames for the tracking button, every time I do it actually seems to completely break the addon. Clearly I'm doing something wrong there. I forget exactly which frame I used, I will try each possibility again.
__________________
MAGICAL CRAWDAD APPROVED:
  Reply With Quote

WoWInterface » Developer Discussions » General Authoring Discussion » Minimap Tracking Icon


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off