Aight, progress, by using
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)
And then self.Experience:SetAlpha(0) in the Experience block, it's correctly hidden on login, and show/hide when i mouseover the player frame. Also, the experience tooltip shows up when i mouse over the experience bar position but the bar stays hidden, or even better have the tooltip shown when i mouse over the player frame, but i don't think it's doable.
Haste explained this
Originally Posted by Haste
You will have to use the OnEnter/OnLeave handler on the frame if you want it to show/hide when you enter the unit frame as a whole however. The above will only work for when you hover the position for the actual frame. You should also use :Hide/:Show in that case, and not :SetAlpha.
|
But i'm not sure to understand it correctly. What should i change to have the experience bar shown when i mouse over it instead of the player frame ?