control click moveable

This commit is contained in:
Manuel Simon Hirsig
2017-11-12 05:26:07 +01:00
parent 08a82f910f
commit b37cd8faea
+13
View File
@@ -103,6 +103,19 @@ function unitscan.LOAD()
button:SetWidth(150)
button:SetHeight(42)
button:SetScale(1.25)
button:SetMovable(true)
button:SetUserPlaced(true)
button:SetClampedToScreen(true)
button:SetScript('OnMouseDown', function()
if IsControlKeyDown() then
this:RegisterForClicks()
this:StartMoving()
end
end)
button:SetScript('OnMouseUp', function()
this:StopMovingOrSizing()
this:RegisterForClicks'LeftButtonDown'
end)
button:SetFrameStrata'FULLSCREEN_DIALOG'
button:SetNormalTexture[[Interface\AddOns\unitscan\UI-Achievement-Parchment-Horizontal]]
button:SetBackdrop{