My other idea I had worked perfectly, actually.
lua Code:
local isOpen = false
local function setAlphaZero()
if not isOpen then
CompactRaidFrameManager:SetAlpha(0)
end
end
CompactRaidFrameContainer:SetParent(UIParent)
CompactRaidFrameManager:SetAlpha(0)
CompactRaidFrameManager:HookScript("OnEnter", function()
CompactRaidFrameManager:SetAlpha(1)
end)
CompactRaidFrameManager:HookScript("OnLeave", setAlphaZero)
CompactRaidFrameManagerToggleButton:HookScript("OnEnter", function()
CompactRaidFrameManager:SetAlpha(1)
end)
CompactRaidFrameManagerToggleButton:HookScript("OnLeave", setAlphaZero)
CompactRaidFrameManagerToggleButton:HookScript("OnClick", function()
if isOpen then
isOpen = false
else
isOpen = true
end
end)
.toc
Code:
## Interface: 70300
## Title: Test
## LoadOnDemand: 1
## LoadWith: Blizzard_RaidUI
Test.lua
The drawer gets hidden when you join a group, and when you mouse over it reappears. When you click the arrow to open the drawer, it registers that the menu is open and keeps Alpha to 1 until the drawer is closed, at which point the code is allowed to set Alpha to 0 again.
Edit: Totally ninjaed by Fizzle with the better solution, though.