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)