-
Posted by Aprikot on Mon, 17 May 2010 21:27:59
I keep my Minimap at half alpha with
Minimap:SetAlpha(0.5)
I use the following for full alpha on mouseover, then back to half alpha on mouseout (works great):
Minimap:SetScript("OnEnter", function() Minimap:SetAlpha(1) end) Minimap:SetScript("OnLeave", function() Minimap:SetAlpha(0.5) end)
I'm unsuccessfully trying to accomplish the same thing for the text in chat frame #1. I can achieve initial semi-transparency using
_G["ChatFrame"..1]:SetAlpha(0.5)
but fail to achieve the desired results using:
_G["ChatFrame"..1:SetScript("OnEnter", function() _G["ChatFrame"..1:SetAlpha(1) end) _G["ChatFrame"..1:SetScript("OnLeave", function() _G["ChatFrame"..1:SetAlpha(0.5) end)
Any ideas are greatly appreciated. Thanks!
-
Posted by jnwhiteh on Tue, 18 May 2010 07:21:18
Are your OnEnter/OnLeave scripts ever being called? That's the first thing to check.
-
Posted by ksignorini on Mon, 31 May 2010 03:04:54
I don't see a close
]
on the global environment call.Shouldn't
_G["ChatFrame"..1:
be_G["ChatFrame"..1]:
?For that matter, it looks like it's missing in the second global environment call (the one inside the function) as well.