View Single Post
Unread 10-06-08, 09:11 AM   #50
Slakah
A Molten Giant
 
Slakah's Avatar
AddOn Author - Click to view addons
Join Date: Aug 2007
Posts: 863
Code:
self:SetScript("OnEnter", function(self) if(unit == 'player') then self.Experience:SetAlpha(1) end UnitFrame_OnEnter(self) end) self:SetScript("OnLeave", function(self) if(unit == 'player') then self.Experience:SetAlpha(0) end UnitFrame_OnLeave(self) end)
If you want the experience to be shown when the cursor is over the exp bar as well, then I would add:

Code:
self.Experience:SetScript("OnEnter", function(self)
	self:SetAlpha(1)
end)
self.Experience:SetScript("OnLeave", function(self)
	self:SetAlpha(0)
end)
Slakah is offline