-
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathHideRaidManager.lua
More file actions
34 lines (29 loc) · 785 Bytes
/
HideRaidManager.lua
File metadata and controls
34 lines (29 loc) · 785 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
local manager = CompactRaidFrameManager
manager:SetAlpha(0)
-- look through a frame's parents
local function FindParent(frame, target)
if frame == target then
return true
elseif frame then
return FindParent(frame:GetParent(), target)
end
end
manager:HookScript("OnEnter", function(self)
self:SetAlpha(1)
end)
manager:HookScript("OnLeave", function(self)
if manager.collapsed and not FindParent(GetMouseFoci()[1], self) then
self:SetAlpha(0)
end
end)
-- pick buttton between classic/retail
local button = manager.toggleButtonBack or manager.toggleButton
button:HookScript("OnClick", function()
if manager.collapsed then
manager:SetAlpha(0)
end
end)
if manager.containerResizeFrame then
-- not in retail
manager.containerResizeFrame:SetIgnoreParentAlpha(true)
end