From 221ff87b6284d760d5be0507d63ac74e22c4ee42 Mon Sep 17 00:00:00 2001 From: Darthpred Date: Wed, 21 Nov 2012 15:14:22 +0400 Subject: [PATCH] Too much damn dirty workarounds >_< --- ElvUI_SLE/modules/raidutility/raidutility.lua | 34 ++++++++++++++++++++++--- 1 file changed, 31 insertions(+), 3 deletions(-) diff --git a/ElvUI_SLE/modules/raidutility/raidutility.lua b/ElvUI_SLE/modules/raidutility/raidutility.lua index dc87cc2..82d1429 100644 --- a/ElvUI_SLE/modules/raidutility/raidutility.lua +++ b/ElvUI_SLE/modules/raidutility/raidutility.lua @@ -14,8 +14,35 @@ end M.InitializeSLE = M.Initialize function M:Initialize() M.InitializeSLE(self) - - RU:MoveButton() + E:CreateMover(RaidUtility_ShowButton, "RaidUtility_Mover", "Raid Utility", nil, nil, nil, "ALL,S&L") + local mover = RaidUtility_Mover + + mover:HookScript("OnDragStart", function(self) + local frame = RaidUtility_ShowButton + frame:ClearAllPoints() + frame:SetPoint("CENTER", self) + end) + + mover:HookScript("OnDragStop", function(self) + local point, anchor, point2, x, y = self:GetPoint() + local frame = RaidUtility_ShowButton + frame:ClearAllPoints() + if string.find(point, "BOTTOM") then + frame:SetPoint(point, anchor, point2, x, y) + else + frame:SetPoint(point, anchor, point2, x, y) + end + end) + + do + local point, anchor, point2, x, y = mover:GetPoint() + local frame = RaidUtility_ShowButton + if string.find(point, "BOTTOM") then + frame:SetPoint(point, anchor, point2, x, y) + else + frame:SetPoint(point, anchor, point2, x, y) + end + end end function RU:ToggleButton() @@ -27,4 +54,5 @@ function RU:ToggleButton() end -RaidUtility_ShowButton:RegisterForDrag("") --Unregister any buttons for dragging. \ No newline at end of file +RaidUtility_ShowButton:RegisterForDrag("") --Unregister any buttons for dragging. + -- 1.7.9.5