Fix for removal of SetTexCoordModifiesRect in 3.3.3.

This commit is contained in:
shefki
2010-03-24 23:54:14 +00:00
parent ff8f7f335a
commit 4cb3f59ff2
11 changed files with 65 additions and 67 deletions

View File

@ -588,7 +588,7 @@ end
-- Creates background for the bar -- Creates background for the bar
function IceBarElement.prototype:CreateBackground() function IceBarElement.prototype:CreateBackground()
if not (self.frame) then if not (self.frame) then
self.frame = CreateFrame("StatusBar", "IceHUD_"..self.elementName, self.parent) self.frame = CreateFrame("Frame", "IceHUD_"..self.elementName, self.parent)
end end
self.frame:SetFrameStrata("BACKGROUND") self.frame:SetFrameStrata("BACKGROUND")
@ -599,10 +599,13 @@ function IceBarElement.prototype:CreateBackground()
self.frame.bg = self.frame:CreateTexture(nil, "BACKGROUND") self.frame.bg = self.frame:CreateTexture(nil, "BACKGROUND")
end end
self.frame.bg:SetTexture(IceElement.TexturePath .. "RivetBarBG")--self:GetMyBarTexture() .."BG") self.frame.bg:SetTexture(IceElement.TexturePath .. self:GetMyBarTexture() .."BG")
self.frame.bg:SetBlendMode(self.settings.barBgBlendMode) self.frame.bg:SetBlendMode(self.settings.barBgBlendMode)
self.frame.bg:ClearAllPoints() self.frame.bg:ClearAllPoints()
self.frame.bg:SetAllPoints(self.frame) self.frame.bg:SetPoint("BOTTOMLEFT",self.frame,"BOTTOMLEFT")
self.frame.bg:SetPoint("BOTTOMRIGHT",self.frame,"BOTTOMRIGHT")
self.frame.bg:SetHeight(self.settings.barHeight)
if (self.moduleSettings.side == IceCore.Side.Left) then if (self.moduleSettings.side == IceCore.Side.Left) then
self.frame.bg:SetTexCoord(1, 0, 0, 1) self.frame.bg:SetTexCoord(1, 0, 0, 1)
@ -610,8 +613,7 @@ function IceBarElement.prototype:CreateBackground()
self.frame.bg:SetTexCoord(0, 1, 0, 1) self.frame.bg:SetTexCoord(0, 1, 0, 1)
end end
--self.frame:SetStatusBarTexture(self.frame.bg) self.frame.bg:SetVertexColor(self:GetColor("undef", self.settings.alphabg))
self.frame:SetStatusBarColor(self:GetColor("undef", self.settings.alphabg))
local ownPoint = "LEFT" local ownPoint = "LEFT"
if (self.moduleSettings.side == ownPoint) then if (self.moduleSettings.side == ownPoint) then
@ -633,7 +635,7 @@ end
-- Creates the actual bar -- Creates the actual bar
function IceBarElement.prototype:CreateBar() function IceBarElement.prototype:CreateBar()
if not (self.barFrame) then if not (self.barFrame) then
self.barFrame = CreateFrame("StatusBar", nil, self.frame) self.barFrame = CreateFrame("Frame", nil, self.frame)
end end
self.barFrame:SetFrameStrata("LOW") self.barFrame:SetFrameStrata("LOW")
@ -642,29 +644,26 @@ function IceBarElement.prototype:CreateBar()
if not (self.barFrame.bar) then if not (self.barFrame.bar) then
self.barFrame.bar = self.frame:CreateTexture(nil, "LOW") self.barFrame.bar = self.frame:CreateTexture(nil, "BACKGROUND")
--self.barFrame.bar:SetHorizTile(true)
--self.barFrame.bar:SetVertTile(true)
end end
self.barFrame.bar:SetTexture(IceElement.TexturePath .. "RivetBar")--self:GetMyBarTexture()) self.barFrame.bar:SetTexture(IceElement.TexturePath .. self:GetMyBarTexture())
self.barFrame.bar:SetBlendMode(self.settings.barBlendMode) self.barFrame.bar:SetBlendMode(self.settings.barBlendMode)
self.barFrame.bar:SetAllPoints(self.barFrame) self.barFrame.bar:ClearAllPoints()
self.barFrame.bar:SetPoint("BOTTOMLEFT",self.barFrame,"BOTTOMLEFT")
self.barFrame.bar:SetPoint("BOTTOMRIGHT",self.barFrame,"BOTTOMRIGHT")
if (self.moduleSettings.side == IceCore.Side.Left) then if (self.moduleSettings.side == IceCore.Side.Left) then
self.barFrame.bar:SetTexCoord(1, 0, 1-self.CurrScale, 1) self.barFrame.bar:SetTexCoord(1, 0, 1-self.CurrScale, 1)
else else
self.barFrame.bar:SetTexCoord(0, 1, 1-self.CurrScale, 1) self.barFrame.bar:SetTexCoord(0, 1, 1-self.CurrScale, 1)
end end
self.barFrame.bar:SetHeight(self.settings.barHeight*self.CurrScale)
--self.barFrame:SetStatusBarTexture(self.barFrame.bar)
self:UpdateBar(1, "undef") self:UpdateBar(1, "undef")
self.barFrame:ClearAllPoints() self.barFrame:ClearAllPoints()
self.barFrame:SetPoint("BOTTOM", self.frame, "BOTTOM", 0, 0) self.barFrame:SetPoint("BOTTOM", self.frame, "BOTTOM", 0, 0)
--self.barFrame.bar:SetPoint("BOTTOM", self.barFrame, "BOTTOM", 0, 0)
end end
@ -781,14 +780,12 @@ function IceBarElement.prototype:SetScale(texture, scale)
max_y = 1; max_y = 1;
end end
end end
--[[
if (self.moduleSettings.side == IceCore.Side.Left) then if (self.moduleSettings.side == IceCore.Side.Left) then
texture:SetTexCoord(1, 0, min_y, max_y) texture:SetTexCoord(1, 0, min_y, max_y)
else else
texture:SetTexCoord(0, 1, min_y, max_y) texture:SetTexCoord(0, 1, min_y, max_y)
end end
]]-- self.barFrame.bar:SetHeight(self.settings.barHeight * self.CurrScale)
self.barFrame:SetHeight(self.settings.barHeight * self.CurrScale)
end end
end end
@ -842,8 +839,7 @@ function IceBarElement.prototype:UpdateBar(scale, color, alpha)
self.alpha = 1 self.alpha = 1
end end
self.frame:SetStatusBarColor(r, g, b, self.backgroundAlpha) self.frame.bg:SetVertexColor(r, g, b, self.backGroundAlpha)
--self.barFrame:SetStatusBarColor(self:GetColor(color))
self.barFrame.bar:SetVertexColor(self:GetColor(color)) self.barFrame.bar:SetVertexColor(self:GetColor(color))
if self.DesiredScale ~= scale then if self.DesiredScale ~= scale then

View File

@ -198,8 +198,8 @@ function IceCastBar.prototype:FlashBar(color, alpha, text, textColor)
r, g, b = self:GetColor(color) r, g, b = self:GetColor(color)
end end
self.frame:SetStatusBarColor(r, g, b, 0.3) self.frame.bg:SetVertexColor(r, g, b, 0.3)
self.barFrame:SetStatusBarColor(self:GetColor(color, 0.8)) self.barFrame.bar:SetVertexColor(self:GetColor(color, 0.8))
self:SetScale(self.barFrame.bar, 1) self:SetScale(self.barFrame.bar, 1)
self:SetBottomText1(text, textColor or "Text") self:SetBottomText1(text, textColor or "Text")

View File

@ -324,7 +324,6 @@ IceHUD.options =
IceHUD.IceCore:SetBarPreset(value) IceHUD.IceCore:SetBarPreset(value)
end, end,
validate = IceHUD.validBarList, validate = IceHUD.validBarList,
disabled = true,
order = 9 order = 9
}, },
@ -347,7 +346,6 @@ IceHUD.options =
IceHUD.IceCore:SetBarTexture(value) IceHUD.IceCore:SetBarTexture(value)
end, end,
validate = IceHUD.validBarList, validate = IceHUD.validBarList,
disabled = true,
order = 11 order = 11
}, },

View File

@ -162,7 +162,7 @@ end
-- Creates the low amount warning frame -- Creates the low amount warning frame
function IceUnitBar.prototype:CreateFlashFrame() function IceUnitBar.prototype:CreateFlashFrame()
if not (self.flashFrame) then if not (self.flashFrame) then
self.flashFrame = CreateFrame("StatusBar", nil, self.frame) self.flashFrame = CreateFrame("Frame", nil, self.frame)
end end
self.flashFrame:SetFrameStrata("BACKGROUND") self.flashFrame:SetFrameStrata("BACKGROUND")
@ -178,9 +178,6 @@ function IceUnitBar.prototype:CreateFlashFrame()
self.flashFrame.flash:SetBlendMode("ADD") self.flashFrame.flash:SetBlendMode("ADD")
self.flashFrame.flash:SetAllPoints(self.flashFrame) self.flashFrame.flash:SetAllPoints(self.flashFrame)
self.flashFrame:SetStatusBarTexture(self.flashFrame.flash)
self:SetScale(self.flashFrame.flash, 1) self:SetScale(self.flashFrame.flash, 1)
self.flashFrame:SetAlpha(0) self.flashFrame:SetAlpha(0)
@ -277,8 +274,8 @@ function IceUnitBar.prototype:UpdateBar(scale, color, alpha)
-- skip if flashFrame hasn't been created yet -- skip if flashFrame hasn't been created yet
return return
end end
self.flashFrame:SetStatusBarColor(self:GetColor(color)) self.flashFrame.flash:SetVertexColor(self:GetColor(color))
if (self.moduleSettings.lowThreshold > 0 and if (self.moduleSettings.lowThreshold > 0 and
self.moduleSettings.lowThresholdFlash and self.moduleSettings.lowThresholdFlash and

View File

@ -386,7 +386,7 @@ end
function CastBar.prototype:CreateLagBar() function CastBar.prototype:CreateLagBar()
if not (self.lagBar) then if not (self.lagBar) then
self.lagBar = CreateFrame("StatusBar", nil, self.frame) self.lagBar = CreateFrame("Frame", nil, self.frame)
end end
self.lagBar:SetFrameStrata("BACKGROUND") self.lagBar:SetFrameStrata("BACKGROUND")
@ -399,15 +399,14 @@ function CastBar.prototype:CreateLagBar()
end end
self.lagBar.bar:SetTexture(IceElement.TexturePath .. self:GetMyBarTexture()) self.lagBar.bar:SetTexture(IceElement.TexturePath .. self:GetMyBarTexture())
self.lagBar.bar:SetAllPoints(self.lagBar) self.lagBar.bar:SetPoint("BOTTOMLEFT",self.lagBar,"BOTTOMLEFT")
self.lagBar.bar:SetPoint("BOTTOMRIGHT",self.lagBar,"BOTTOMRIGHT")
self.lagBar:SetStatusBarTexture(self.lagBar.bar)
local r, g, b = self:GetColor("CastLag") local r, g, b = self:GetColor("CastLag")
if (self.settings.backgroundToggle) then if (self.settings.backgroundToggle) then
r, g, b = self:GetColor("CastCasting") r, g, b = self:GetColor("CastCasting")
end end
self.lagBar:SetStatusBarColor(r, g, b, self.moduleSettings.lagAlpha) self.lagBar.bar:SetVertexColor(r, g, b, self.moduleSettings.lagAlpha)
if (self.moduleSettings.side == IceCore.Side.Left) then if (self.moduleSettings.side == IceCore.Side.Left) then
@ -415,6 +414,7 @@ function CastBar.prototype:CreateLagBar()
else else
self.lagBar.bar:SetTexCoord(0, 1, 0, 0) self.lagBar.bar:SetTexCoord(0, 1, 0, 0)
end end
self.lagBar.bar:SetHeight(0)
self.lagBar:ClearAllPoints() self.lagBar:ClearAllPoints()
self.lagBar:SetPoint("BOTTOM", self.frame, "BOTTOM", 0, 0) self.lagBar:SetPoint("BOTTOM", self.frame, "BOTTOM", 0, 0)
@ -446,15 +446,16 @@ function CastBar.prototype:SpellCastStart(unit, spell, rank)
pos = 0 pos = 0
end end
local y = self.settings.barHeight - (pos * self.settings.barHeight) local y = self.settings.barHeight - (pos * self.settings.barHeight)
--[[
if (self.moduleSettings.side == IceCore.Side.Left) then if (self.moduleSettings.side == IceCore.Side.Left) then
self.lagBar.bar:SetTexCoord(1, 0, 0, pos) self.lagBar.bar:SetTexCoord(1, 0, 0, pos)
else else
self.lagBar.bar:SetTexCoord(0, 1, 0, pos) self.lagBar.bar:SetTexCoord(0, 1, 0, pos)
end end
self.lagBar.bar:SetHeight(self.settings.barHeight * pos)
self.lagBar:SetPoint("BOTTOM", self.frame, "BOTTOM", 0, y)
]]-- self.lagBar:ClearAllPoints()
self.lagBar:SetPoint("BOTTOM", self.frame, "BOTTOM", 0, y)
end end
@ -474,15 +475,15 @@ function CastBar.prototype:SpellCastChannelStart(unit)
pos = 0 pos = 0
end end
local y = self.settings.barHeight - (pos * self.settings.barHeight) local y = self.settings.barHeight - (pos * self.settings.barHeight)
--[[
if (self.moduleSettings.side == IceCore.Side.Left) then if (self.moduleSettings.side == IceCore.Side.Left) then
self.lagBar.bar:SetTexCoord(1, 0, 1-pos, 1) self.lagBar.bar:SetTexCoord(1, 0, 1-pos, 1)
else else
self.lagBar.bar:SetTexCoord(0, 1, 1-pos, 1) self.lagBar.bar:SetTexCoord(0, 1, 1-pos, 1)
end end
self.lagBar.bar:SetHeight(self.settings.barHeight * pos)
self.lagBar:SetPoint("BOTTOM", self.frame, "BOTTOM", 0, 0) self.lagBar:SetPoint("BOTTOM", self.frame, "BOTTOM", 0, 0)
]]--
end end

View File

@ -354,7 +354,6 @@ function IceCustomBar.prototype:UpdateCustomBar(unit, fromUpdate)
self:SetBottomText1(self.moduleSettings.upperText) self:SetBottomText1(self.moduleSettings.upperText)
end end
--self.barFrame:SetStatusBarColor(self:GetBarColor())
self.barFrame.bar:SetVertexColor(self:GetBarColor()) self.barFrame.bar:SetVertexColor(self:GetBarColor())
end end

View File

@ -276,7 +276,6 @@ function IceCustomCDBar.prototype:UpdateCustomBar(fromUpdate)
self:SetBottomText1(self.moduleSettings.upperText) self:SetBottomText1(self.moduleSettings.upperText)
end end
--self.barFrame:SetStatusBarColor(self:GetBarColor())
self.barFrame.bar:SetVertexColor(self:GetBarColor()) self.barFrame.bar:SetVertexColor(self:GetBarColor())
end end

View File

@ -744,7 +744,7 @@ end
function PlayerHealth.prototype:CreateHealBar() function PlayerHealth.prototype:CreateHealBar()
if not self.healFrame then if not self.healFrame then
self.healFrame = CreateFrame("Statusbar", nil, self.frame) self.healFrame = CreateFrame("Frame", nil, self.frame)
end end
self.healFrame:SetFrameStrata("LOW") self.healFrame:SetFrameStrata("LOW")
@ -756,10 +756,10 @@ function PlayerHealth.prototype:CreateHealBar()
end end
self.healFrame.bar:SetTexture(IceElement.TexturePath .. self:GetMyBarTexture()) 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.bar:SetVertexColor(self:GetColor("PlayerHealthHealAmount", self.alpha * self.moduleSettings.healAlpha))
self.healFrame:SetStatusBarColor(self:GetColor("PlayerHealthHealAmount", self.alpha * self.moduleSettings.healAlpha))
self:UpdateBar(1, "undef") 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 -- 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 if self.moduleSettings.showIncomingHeals and self.healFrame and self.healFrame.bar and incomingHealAmt then
local barValue local barValue, percent
if incomingHealAmt > 0 then if incomingHealAmt > 0 then
barValue = 1-((self.health + incomingHealAmt) / self.maxHealth) percent = ((self.health + incomingHealAmt) / self.maxHealth)
barValue = 1-percent
else else
barValue = 1 barValue = 1
percent = 0
end end
barValue = IceHUD:Clamp(barValue, 0, 1) barValue = IceHUD:Clamp(barValue, 0, 1)
percent = IceHUD:Clamp(percent, 0, 1)
if (self.moduleSettings.side == IceCore.Side.Left) then if (self.moduleSettings.side == IceCore.Side.Left) then
self.healFrame.bar:SetTexCoord(1, 0, barValue, 1) self.healFrame.bar:SetTexCoord(1, 0, barValue, 1)
else else
self.healFrame.bar:SetTexCoord(0, 1, barValue, 1) self.healFrame.bar:SetTexCoord(0, 1, barValue, 1)
end end
self.healFrame.bar:SetHeight(self.settings.barHeight * percent)
end end
if not IceHUD.IceCore:ShouldUseDogTags() then if not IceHUD.IceCore:ShouldUseDogTags() then

View File

@ -67,7 +67,7 @@ if self:ShouldUseTicker() then
end, end,
set = function(value) set = function(value)
self.moduleSettings.tickerAlpha = value self.moduleSettings.tickerAlpha = value
self.tickerFrame:SetStatusBarColor(self:GetColor("PlayerEnergy", self.moduleSettings.tickerAlpha)) self.tickerFrame.spark:SetVertexColor(self:GetColor("PlayerEnergy", self.moduleSettings.tickerAlpha))
end, end,
disabled = function() disabled = function()
return not self.moduleSettings.enabled return not self.moduleSettings.enabled
@ -262,9 +262,9 @@ function PlayerMana.prototype:Update(unit)
if self:ShouldUseTicker() then if self:ShouldUseTicker() then
-- hide ticker if rest of the bar is not visible -- hide ticker if rest of the bar is not visible
if (self.alpha == 0) then if (self.alpha == 0) then
self.tickerFrame:SetStatusBarColor(self:GetColor("PlayerEnergy", 0)) self.tickerFrame.spark:SetVertexColor(self:GetColor("PlayerEnergy", 0))
else else
self.tickerFrame:SetStatusBarColor(self:GetColor("PlayerEnergy", self.moduleSettings.tickerAlpha)) self.tickerFrame.spark:SetVertexColor(self:GetColor("PlayerEnergy", self.moduleSettings.tickerAlpha))
end end
end end
@ -341,6 +341,7 @@ function PlayerMana.prototype:EnergyTick()
else else
self.tickerFrame.spark:SetTexCoord(0, 1, 1-pos-0.01, 1-pos) self.tickerFrame.spark:SetTexCoord(0, 1, 1-pos-0.01, 1-pos)
end end
self.tickerFrame.spark:SetHeight(self.settings.barHeight * 0.01)
self.tickerFrame:SetPoint("BOTTOMLEFT", self.frame, "BOTTOMLEFT", 0, y) self.tickerFrame:SetPoint("BOTTOMLEFT", self.frame, "BOTTOMLEFT", 0, y)
end end
@ -352,7 +353,7 @@ function PlayerMana.prototype:CreateTickerFrame()
end end
if not (self.tickerFrame) then if not (self.tickerFrame) then
self.tickerFrame = CreateFrame("StatusBar", nil, self.barFrame) self.tickerFrame = CreateFrame("Frame", nil, self.barFrame)
end end
self.tickerFrame:SetFrameStrata("BACKGROUND") self.tickerFrame:SetFrameStrata("BACKGROUND")
@ -367,10 +368,11 @@ function PlayerMana.prototype:CreateTickerFrame()
self.tickerFrame.spark:SetTexture(IceElement.TexturePath .. self:GetMyBarTexture()) self.tickerFrame.spark:SetTexture(IceElement.TexturePath .. self:GetMyBarTexture())
self.tickerFrame.spark:SetBlendMode("ADD") self.tickerFrame.spark:SetBlendMode("ADD")
self.tickerFrame.spark:ClearAllPoints() self.tickerFrame.spark:ClearAllPoints()
self.tickerFrame.spark:SetAllPoints(self.tickerFrame) self.tickerFrame.spark:SetPoint("BOTTOMLEFT",self.tickerFrame,"BOTTOMLEFT")
self.tickerFrame.spark:SetPoint("BOTTOMRIGHT",self.tickerFrame,"BOTTOMRIGHT")
self.tickerFrame:SetStatusBarTexture(self.tickerFrame.spark) self.tickerFrame.spark:SetHeight(0)
self.tickerFrame:SetStatusBarColor(self:GetColor("PlayerEnergy", self.moduleSettings.tickerAlpha))
self.tickerFrame.spark:SetVertexColor(self:GetColor("PlayerEnergy", self.moduleSettings.tickerAlpha))
self.tickerFrame:ClearAllPoints() self.tickerFrame:ClearAllPoints()
self.tickerFrame:SetPoint("BOTTOMLEFT", self.frame, "BOTTOMLEFT", 0, 0) self.tickerFrame:SetPoint("BOTTOMLEFT", self.frame, "BOTTOMLEFT", 0, 0)

View File

@ -153,10 +153,10 @@ function SliceAndDice.prototype:CreateDurationBar()
end end
self.durationFrame.bar:SetTexture(IceElement.TexturePath .. self:GetMyBarTexture()) self.durationFrame.bar:SetTexture(IceElement.TexturePath .. self:GetMyBarTexture())
self.durationFrame.bar:SetAllPoints(self.frame) self.durationFrame.bar:SetPoint("BOTTOMLEFT",self.frame,"BOTTOMLEFT")
self.durationFrame.bar:SetPoint("BOTTOMRIGHT",self.frame,"BOTTOMRIGHT")
self.durationFrame:SetStatusBarTexture(self.durationFrame.bar) self.durationFrame.bar:SetVertexColor(self:GetColor("SliceAndDicePotential", self.alpha * self.moduleSettings.durationAlpha))
self.durationFrame:SetStatusBarColor(self:GetColor("SliceAndDicePotential", self.alpha * self.moduleSettings.durationAlpha))
self:UpdateBar(1, "undef") self:UpdateBar(1, "undef")
@ -285,6 +285,7 @@ function SliceAndDice.prototype:UpdateDurationBar(unit)
else else
self.durationFrame.bar:SetTexCoord(0, 1, 1-scale, 1) self.durationFrame.bar:SetTexCoord(0, 1, 1-scale, 1)
end end
self.durationFrame.bar:SetHeight(self.settings.barHeight * scale)
if sndEndTime < GetTime() then if sndEndTime < GetTime() then
self:SetBottomText1(self.moduleSettings.upperText .. "0 (" .. PotentialSnDDuration .. ")") self:SetBottomText1(self.moduleSettings.upperText .. "0 (" .. PotentialSnDDuration .. ")")

View File

@ -155,7 +155,7 @@ end
-- create the aggro range indicator bar -- create the aggro range indicator bar
function IceThreat.prototype:CreateAggroBar() function IceThreat.prototype:CreateAggroBar()
if not (self.aggroBar) then if not (self.aggroBar) then
self.aggroBar = CreateFrame("StatusBar", nil, self.frame) self.aggroBar = CreateFrame("Frame", nil, self.frame)
end end
self.aggroBar:SetFrameStrata("BACKGROUND") self.aggroBar:SetFrameStrata("BACKGROUND")
@ -167,21 +167,21 @@ function IceThreat.prototype:CreateAggroBar()
end end
self.aggroBar.bar:SetTexture(IceElement.TexturePath .. self:GetMyBarTexture() .. "BG") self.aggroBar.bar:SetTexture(IceElement.TexturePath .. self:GetMyBarTexture() .. "BG")
self.aggroBar.bar:SetAllPoints(self.aggroBar) self.aggroBar.bar:SetPoint("BOTTOMLEFT",self.aggroBar,"BOTTOMLEFT")
self.aggroBar.bar:SetPoint("BOTTOMRIGHT",self.aggroBar,"BOTTOMRIGHT")
self.aggroBar:SetStatusBarTexture(self.aggroBar.bar)
local r, g, b = self:GetColor("ThreatPullAggro") local r, g, b = self:GetColor("ThreatPullAggro")
if (self.settings.backgroundToggle) then if (self.settings.backgroundToggle) then
r, g, b = self:GetColor("CastCasting") r, g, b = self:GetColor("CastCasting")
end end
self.aggroBar:SetStatusBarColor(r, g, b, self.moduleSettings.aggroAlpha) self.aggroBar.bar:SetVertexColor(r, g, b, self.moduleSettings.aggroAlpha)
if (self.moduleSettings.side == IceCore.Side.Left) then if (self.moduleSettings.side == IceCore.Side.Left) then
self.aggroBar.bar:SetTexCoord(1, 0, 0, 0) self.aggroBar.bar:SetTexCoord(1, 0, 0, 0)
else else
self.aggroBar.bar:SetTexCoord(0, 1, 0, 0) self.aggroBar.bar:SetTexCoord(0, 1, 0, 0)
end end
self.aggroBar.bar:SetHeight(0)
self.aggroBar:ClearAllPoints() self.aggroBar:ClearAllPoints()
self.aggroBar:SetPoint("BOTTOM", self.frame, "BOTTOM", 0, 0) self.aggroBar:SetPoint("BOTTOM", self.frame, "BOTTOM", 0, 0)
@ -288,7 +288,7 @@ function IceThreat.prototype:Update(unit)
-- set the bar value -- set the bar value
self:UpdateBar( scaledPercentZeroToOne, self.color ) self:UpdateBar( scaledPercentZeroToOne, self.color )
--[[
-- do the aggro indicator bar stuff, but only if it has changed -- do the aggro indicator bar stuff, but only if it has changed
if ( self.aggroBarMulti ~= rangeMulti ) then if ( self.aggroBarMulti ~= rangeMulti ) then
self.aggroBarMulti = rangeMulti self.aggroBarMulti = rangeMulti
@ -301,10 +301,11 @@ function IceThreat.prototype:Update(unit)
else else
self.aggroBar.bar:SetTexCoord(0, 1, 0, pos) self.aggroBar.bar:SetTexCoord(0, 1, 0, pos)
end end
self.aggroBar.bar:SetHeight(self.settings.barHeight * pos)
self.aggroBar:SetPoint("BOTTOM", self.frame, "BOTTOM", 0, y) self.aggroBar:SetPoint("BOTTOM", self.frame, "BOTTOM", 0, y)
end end
]]--
self:UpdateAlpha() self:UpdateAlpha()
end end