View Single Post
Unread 10-09-08, 12:44 PM   #59
Caellian
A Frostmaul Preserver
 
Caellian's Avatar
AddOn Author - Click to view addons
Join Date: May 2006
Posts: 268
Exp mouseover take 2

Aight, still on about the experience mouseover thingy, but with some progress this time.

It's now working correctly, 'almost', with the following code in the exp block of the layout, the exp bar + tooltip shows and hides on mouseover as expected.
There is one very small issue left, on login or /rl, i have to mouseover the player frame before it starts working. If i don't do that, when i mouseover the exp bar only the tooltip is shown, not the bar itself.

Code:
			self:SetScript("OnEnter", function(self)
				local origonenter, origonleave = self.Experience:GetScript("OnEnter"), self.Experience:GetScript("OnLeave")
				self.Experience:SetScript('OnEnter', function(self,...) self:SetAlpha(1) origonenter(self, ...) end)
			end)

			self:SetScript("OnLeave", function(self)
				local origonenter, origonleave = self.Experience:GetScript("OnEnter"), self.Experience:GetScript("OnLeave")
				self.Experience:SetScript('OnLeave', function(self, ...) self:SetAlpha(0) origonleave(self,...) end)
			end)
__________________
if (sizeof(workload) > sizeof(brain_capacity)) { die('System Overload'); }
Caellian is offline