- added some code to hide a bar if its height would have been set to 0. not sure why, but GlowArc and HiBar are having issues with zero-height bars, so this seems to fix it without needing to figure out what's up with the texture

This commit is contained in:
Parnic
2010-03-25 19:55:29 +00:00
parent fbdfbcd77f
commit aeb3ed2026
5 changed files with 37 additions and 0 deletions

View File

@ -415,6 +415,7 @@ function CastBar.prototype:CreateLagBar()
self.lagBar.bar:SetTexCoord(0, 1, 0, 0)
end
self.lagBar.bar:SetHeight(0)
self.lagBar.bar:Hide()
self.lagBar:ClearAllPoints()
self.lagBar:SetPoint("BOTTOM", self.frame, "BOTTOM", 0, 0)
@ -453,6 +454,12 @@ function CastBar.prototype:SpellCastStart(unit, spell, rank)
self.lagBar.bar:SetTexCoord(0, 1, 0, pos)
end
self.lagBar.bar:SetHeight(self.settings.barHeight * pos)
if pos == 0 then
self.lagBar.bar:Hide()
else
self.lagBar.bar:Show()
end
self.lagBar:ClearAllPoints()
self.lagBar:SetPoint("BOTTOM", self.frame, "BOTTOM", 0, y)
@ -483,6 +490,12 @@ function CastBar.prototype:SpellCastChannelStart(unit)
end
self.lagBar.bar:SetHeight(self.settings.barHeight * pos)
if pos == 0 then
self.lagBar.bar:Hide()
else
self.lagBar.bar:Show()
end
self.lagBar:SetPoint("BOTTOM", self.frame, "BOTTOM", 0, 0)
end