View Single Post
Unread 10-05-08, 10:46 AM   #35
Slakah
A Molten Giant
 
Slakah's Avatar
AddOn Author - Click to view addons
Join Date: Aug 2007
Posts: 863
I've added self.Experience:Hide() to the exp block but it still is shown on login though.
Line 72 of oUF_Experience bar:Show().

So you'll need to force it to hide when shown i.e.

Code:
local function Hide(f)
   f:Hide()
   f:SetScript("OnShow", f.Hide)
end
local function Show(f)
	f:Show()
	f:SetScript("OnShow", nil)
end

Hide(self.Experience)

self:SetScript("OnEnter", function(self)
	if(unit == 'player') then Show(self.Experience) end
	UnitFrame_OnEnter(self)
end)
self:SetScript("OnLeave", function(self)
	if(unit == 'player') then Hide(self.Experience) end
	UnitFrame_OnLeave(self)
end)

Last edited by Slakah : 10-05-08 at 02:35 PM.
Slakah is offline