Quantcast

Use alpha to temporary hide the overlay until combat is dropped

p3lim [12-12-10 - 23:04]
Use alpha to temporary hide the overlay until combat is dropped
Filename
Molinari.lua
diff --git a/Molinari.lua b/Molinari.lua
index d9cf641..4b9e2fd 100644
--- a/Molinari.lua
+++ b/Molinari.lua
@@ -51,6 +51,7 @@ function button:MODIFIER_STATE_CHANGED(key)
 	if(not self:IsShown() and not key and key ~= 'LALT' and key ~= 'RALT') then return end

 	if(InCombatLockdown()) then
+		self:SetAlpha(0)
 		self:RegisterEvent('PLAYER_REGEN_ENABLED')
 	else
 		self:ClearAllPoints()
@@ -61,5 +62,6 @@ end
 function button:PLAYER_REGEN_ENABLED()
 	self:UnregisterEvent('PLAYER_REGEN_ENABLED')
 	self:ClearAllPoints()
+	self:SetAlpha(1)
 	self:Hide()
 end