From b37cd8faeab2c02cbb9a69046e7ad680358dbf6c Mon Sep 17 00:00:00 2001 From: Manuel Simon Hirsig Date: Sun, 12 Nov 2017 05:26:07 +0100 Subject: [PATCH] control click moveable --- unitscan.lua | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/unitscan.lua b/unitscan.lua index 8f1026d..474003f 100644 --- a/unitscan.lua +++ b/unitscan.lua @@ -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{