From d6e3ae3cd9cc516fb07abb0481c5ba42a2a1e846 Mon Sep 17 00:00:00 2001 From: Parnic Date: Mon, 12 Apr 2010 05:26:46 +0000 Subject: [PATCH] - fixed up the clickable frame for player and target to be hidden/unclickable when the bar alpha is at 0 --- modules/PlayerHealth.lua | 10 +++++++++- modules/TargetHealth.lua | 12 ++++++++++++ 2 files changed, 21 insertions(+), 1 deletion(-) diff --git a/modules/PlayerHealth.lua b/modules/PlayerHealth.lua index d8b6f93..483c7e2 100644 --- a/modules/PlayerHealth.lua +++ b/modules/PlayerHealth.lua @@ -1171,10 +1171,18 @@ UIParent:RegisterEvent("RAID_ROSTER_UPDATE") function PlayerHealth.prototype:UpdateBar(scale, color, alpha) PlayerHealth.super.prototype.UpdateBar(self, scale, color, alpha) - + if self.healFrame and self.healFrame.bar then self.healFrame.bar:SetVertexColor(self:GetColor("PlayerHealthHealAmount", self.alpha * self.moduleSettings.healAlpha)) end + + if self.frame.button then + if self.alpha == 0 then + self.frame.button:Hide() + else + self.frame.button:Show() + end + end end -- Load us up diff --git a/modules/TargetHealth.lua b/modules/TargetHealth.lua index 2d608eb..179bc5f 100644 --- a/modules/TargetHealth.lua +++ b/modules/TargetHealth.lua @@ -893,6 +893,18 @@ function IceTargetHealth.prototype:HideBlizz() ComboFrame:UnregisterAllEvents() end +function IceTargetHealth.prototype:UpdateBar(scale, color, alpha) + IceTargetHealth.super.prototype.UpdateBar(self, scale, color, alpha) + + if self.frame.button then + if self.alpha == 0 then + self.frame.button:Hide() + else + self.frame.button:Show() + end + end +end + -- Load us up