public
Description: WoW Powerleveling addon
Homepage: http://www.tekkub.net/
Clone URL: git://github.com/tekkub/tourguide.git
Click here to lend your support to: tourguide and make a donation at www.pledgie.com !
Fix bug when moving item button
tekkub (author)
Fri Jul 18 18:52:07 -0700 2008
commit  8dd309283281b2a42d1652c8389326ef764b89ef
tree    d9f69b72777f75cb901346ef318c1deb80c2d0ba
parent  c2ce29ce82a226119b19eb7e84c27ca5c12d41bd
...
49
50
51
52
53
 
 
54
55
56
...
49
50
51
 
 
52
53
54
55
56
0
@@ -49,8 +49,8 @@ frame:SetClampedToScreen(true)
0
 frame:SetScript("OnDragStart", frame.StartMoving)
0
 frame:SetScript("OnDragStop", function(frame)
0
   frame:StopMovingOrSizing()
0
- TourGuide:Debug(1, "Item frame moved", GetUIParentAnchor(frame))
0
- TourGuide.db.profile.itemframepoint, TourGuide.db.profile.itemframex, TourGuide.db.profile.itemframey = GetUIParentAnchor(frame)
0
+ TourGuide.db.profile.itemframepoint, TourGuide.db.profile.itemframex, TourGuide.db.profile.itemframey = TourGuide.GetUIParentAnchor(frame)
0
+ TourGuide:Debug(1, "Item frame moved", TourGuide.db.profile.itemframepoint, TourGuide.db.profile.itemframex, TourGuide.db.profile.itemframey)
0
 end)
0
 
0
 
...
120
121
122
123
 
124
125
126
...
140
141
142
143
144
 
 
145
146
147
...
120
121
122
 
123
124
125
126
...
140
141
142
 
 
143
144
145
146
147
0
@@ -120,7 +120,7 @@ f:SetScript("OnEnter", dataobj.OnEnter)
0
 check:SetScript("OnClick", function(self, btn) TourGuide:SetTurnedIn() end)
0
 
0
 
0
-local function GetUIParentAnchor(frame)
0
+function TourGuide.GetUIParentAnchor(frame)
0
   local w, h, x, y = UIParent:GetWidth(), UIParent:GetHeight(), frame:GetCenter()
0
   local hhalf, vhalf = (x > w/2) and "RIGHT" or "LEFT", (y > h/2) and "TOP" or "BOTTOM"
0
   local dx = hhalf == "RIGHT" and math.floor(frame:GetRight() + 0.5) - w or math.floor(frame:GetLeft() + 0.5)
0
@@ -140,8 +140,8 @@ f:SetScript("OnDragStart", function(frame)
0
 end)
0
 f:SetScript("OnDragStop", function(frame)
0
   frame:StopMovingOrSizing()
0
- TourGuide:Debug(1, "Status frame moved", GetUIParentAnchor(frame))
0
- TourGuide.db.profile.statusframepoint, TourGuide.db.profile.statusframex, TourGuide.db.profile.statusframey = GetUIParentAnchor(frame)
0
+ TourGuide.db.profile.statusframepoint, TourGuide.db.profile.statusframex, TourGuide.db.profile.statusframey = TourGuide.GetUIParentAnchor(frame)
0
+ TourGuide:Debug(1, "Status frame moved", TourGuide.db.profile.statusframepoint, TourGuide.db.profile.statusframex, TourGuide.db.profile.statusframey)
0
   frame:ClearAllPoints()
0
   frame:SetPoint(TourGuide.db.profile.statusframepoint, TourGuide.db.profile.statusframex, TourGuide.db.profile.statusframey)
0
   dataobj.OnEnter(frame)

Comments

    No one has commented yet.