From fe92f8bfd7a442ebcc318e0bb6b0fab816cd027c Mon Sep 17 00:00:00 2001 From: Schaka Date: Thu, 31 Jul 2014 01:36:12 +0200 Subject: [PATCH] fix flash --- SnowfallKeyPressAnimation/SnowfallKeyPressAnimation.lua | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/SnowfallKeyPressAnimation/SnowfallKeyPressAnimation.lua b/SnowfallKeyPressAnimation/SnowfallKeyPressAnimation.lua index 1ae269e..a58b37a 100644 --- a/SnowfallKeyPressAnimation/SnowfallKeyPressAnimation.lua +++ b/SnowfallKeyPressAnimation/SnowfallKeyPressAnimation.lua @@ -72,14 +72,21 @@ end local animationNum = 1; local function animate(button) -- Don't animate invisible buttons + if (not button:IsVisible()) then return true; end - + if (BonusActionBarFrame:IsProtected() and BonusActionBarFrame:IsShown() and button.mainBar) then + button = _G["BonusActionButton"..button.clickButtonName] + elseif (button.mainBar and not BonusActionBarFrame:IsShown()) then + button = _G["ActionButton"..button.clickButtonName] + end + button:ClearAllPoints() local animation = animations[animationNum]; local frame = animation.frame; local animationGroup = animation.animationGroup; + frame:ClearAllPoints() -- Place the animation on top of the button frame:SetFrameStrata(button:GetFrameStrata()); frame:SetFrameLevel(button:GetFrameLevel() + 10);