View Single Post
10-07-11, 03:24 PM   #1335
ALZA
A Deviate Faerie Dragon
 
ALZA's Avatar
AddOn Author - Click to view addons
Join Date: Oct 2008
Posts: 19
Originally Posted by zork View Post
Preparing for 4.3
May I suggest to hide CompactRaidFrameManager? IMO it's absolutely useless in collapsed state.

One of possible solutions:
Code:
local listener = CreateFrame"Frame"

local function OnEvent(self, event, addon)
	if(addon=="Blizzard_CompactRaidFrames") then
		CompactRaidFrameManagerToggleButton:EnableMouse(false)

		local man = CompactRaidFrameManager
		man:SetAlpha(0)
		
		man.container:SetParent(UIParent)

		man:SetScript("OnMouseUp", CompactRaidFrameManager_Toggle)
	
		man:SetScript("OnEnter", function(self)
			if(self.collapsed) then
				UIFrameFadeIn(man, .2, 0, 1)
			end
		end)
			
		man:SetScript("OnLeave", function(self)
			if(self.collapsed) then
				UIFrameFadeOut(man, .2, 1, 0)
			end
		end)

		self:UnregisterEvent(event)
		self:SetScript("OnEvent", nil)
	end
end

if(IsAddOnLoaded"Blizzard_CompactRaidFrames") then
	OnEvent(listener, "ADDON_LOADED", "Blizzard_CompactRaidFrames")
else
	listener:RegisterEvent"ADDON_LOADED"
	listener:SetScript("OnEvent", OnEvent)
end
Fades out the frame when it's minimized and fades back in when i'ts under mouse or opened. Should work at live realms.

Last edited by ALZA : 10-08-11 at 09:57 AM. Reason: need more practice in English :<