mirror of
https://github.com/parnic/ice-hud.git
synced 2025-06-16 06:40:13 -05:00
Fix for removal of SetTexCoordModifiesRect in 3.3.3.
This commit is contained in:
@ -744,7 +744,7 @@ end
|
||||
|
||||
function PlayerHealth.prototype:CreateHealBar()
|
||||
if not self.healFrame then
|
||||
self.healFrame = CreateFrame("Statusbar", nil, self.frame)
|
||||
self.healFrame = CreateFrame("Frame", nil, self.frame)
|
||||
end
|
||||
|
||||
self.healFrame:SetFrameStrata("LOW")
|
||||
@ -756,10 +756,10 @@ function PlayerHealth.prototype:CreateHealBar()
|
||||
end
|
||||
|
||||
self.healFrame.bar:SetTexture(IceElement.TexturePath .. self:GetMyBarTexture())
|
||||
self.healFrame.bar:SetAllPoints(self.frame)
|
||||
self.healFrame.bar:SetPoint("BOTTOMLEFT",self.frame,"BOTTOMLEFT")
|
||||
self.healFrame.bar:SetPoint("BOTTOMRIGHT",self.frame,"BOTTOMRIGHT")
|
||||
|
||||
self.healFrame:SetStatusBarTexture(self.healFrame.bar)
|
||||
self.healFrame:SetStatusBarColor(self:GetColor("PlayerHealthHealAmount", self.alpha * self.moduleSettings.healAlpha))
|
||||
self.healFrame.bar:SetVertexColor(self:GetColor("PlayerHealthHealAmount", self.alpha * self.moduleSettings.healAlpha))
|
||||
|
||||
self:UpdateBar(1, "undef")
|
||||
|
||||
@ -965,21 +965,25 @@ function PlayerHealth.prototype:Update(unit)
|
||||
|
||||
-- sadly, animation uses bar-local variables so we can't use the animation for 2 bar textures on the same bar element
|
||||
if self.moduleSettings.showIncomingHeals and self.healFrame and self.healFrame.bar and incomingHealAmt then
|
||||
local barValue
|
||||
local barValue, percent
|
||||
|
||||
if incomingHealAmt > 0 then
|
||||
barValue = 1-((self.health + incomingHealAmt) / self.maxHealth)
|
||||
percent = ((self.health + incomingHealAmt) / self.maxHealth)
|
||||
barValue = 1-percent
|
||||
else
|
||||
barValue = 1
|
||||
percent = 0
|
||||
end
|
||||
|
||||
barValue = IceHUD:Clamp(barValue, 0, 1)
|
||||
percent = IceHUD:Clamp(percent, 0, 1)
|
||||
|
||||
if (self.moduleSettings.side == IceCore.Side.Left) then
|
||||
self.healFrame.bar:SetTexCoord(1, 0, barValue, 1)
|
||||
else
|
||||
self.healFrame.bar:SetTexCoord(0, 1, barValue, 1)
|
||||
end
|
||||
self.healFrame.bar:SetHeight(self.settings.barHeight * percent)
|
||||
end
|
||||
|
||||
if not IceHUD.IceCore:ShouldUseDogTags() then
|
||||
|
Reference in New Issue
Block a user