public
Description: WoW Addon - Square Minimap and more
Homepage: http://www.tekkub.net/
Clone URL: git://github.com/tekkub/squeenix.git
Click here to lend your support to: squeenix and make a donation at www.pledgie.com !
squeenix / Move.lua
100644 22 lines (16 sloc) 0.697 kb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
if not Squeenix then return end
local Squeenix = Squeenix
 
 
Minimap:SetMovable(true)
Minimap:EnableMouse(true)
Minimap:RegisterForDrag("LeftButton")
Minimap:SetScript("OnDragStart", function(frame) if Squeenix.db.unlocked then frame:StartMoving() end end)
Minimap:SetScript("OnDragStop", function(frame)
if not Squeenix.db.unlocked then return end
frame:StopMovingOrSizing()
Squeenix.db.x, Squeenix.db.y = frame:GetCenter()
Squeenix.db.anchorframe, Squeenix.db.anchor = "UIParent", "BOTTOMLEFT"
end)
 
 
function Squeenix:SetPosition()
Minimap:ClearAllPoints()
Minimap:SetPoint("CENTER", self.db.anchorframe or "MinimapCluster", self.db.anchor or "TOP", self.db.x or 9, self.db.y or -92)
end