mirror of
https://github.com/parnic/ice-hud.git
synced 2025-06-16 06:40:13 -05:00
Apply strata adjustment inside BarFactory instead of every callsite
This commit is contained in:
@ -1040,7 +1040,7 @@ end
|
||||
|
||||
-- Creates the actual bar
|
||||
function IceBarElement.prototype:CreateBar()
|
||||
self.barFrame = self:BarFactory(self.barFrame, IceHUD.IceCore:DetermineStrata("LOW"), "ARTWORK", "Bar")
|
||||
self.barFrame = self:BarFactory(self.barFrame, "LOW", "ARTWORK", "Bar")
|
||||
|
||||
self:SetBarCoord(self.barFrame)
|
||||
|
||||
@ -1056,7 +1056,7 @@ function IceBarElement.prototype:BarFactory(barFrame, frameStrata, textureLayer,
|
||||
barFrame = CreateFrame("Frame", "IceHUD_"..self.elementName.."_"..(nameSuffix or "Bar"), self.frame)
|
||||
end
|
||||
|
||||
barFrame:SetFrameStrata(frameStrata and frameStrata or IceHUD.IceCore:DetermineStrata("LOW"))
|
||||
barFrame:SetFrameStrata(IceHUD.IceCore:DetermineStrata(frameStrata and frameStrata or "LOW"))
|
||||
barFrame:SetWidth(self.settings.barWidth + (self.moduleSettings.widthModifier or 0))
|
||||
barFrame:SetHeight(self.settings.barHeight)
|
||||
self:SetBarFramePoints(barFrame)
|
||||
|
@ -426,7 +426,7 @@ end
|
||||
|
||||
function CastBar.prototype:CreateLagBar()
|
||||
if self.lagBar == nil then
|
||||
self.lagBar = self:BarFactory(self.lagBar, IceHUD.IceCore:DetermineStrata("LOW"), "OVERLAY", "Lag")
|
||||
self.lagBar = self:BarFactory(self.lagBar, "LOW", "OVERLAY", "Lag")
|
||||
end
|
||||
|
||||
local r, g, b = self:GetColor("CastLag")
|
||||
|
@ -107,7 +107,7 @@ function EclipseBar.prototype:CreateFrame()
|
||||
end
|
||||
|
||||
function EclipseBar.prototype:CreateSolarBar()
|
||||
self.solarBar = self:BarFactory(self.solarBar, IceHUD.IceCore:DetermineStrata("BACKGROUND"), "ARTWORK", "Solar")
|
||||
self.solarBar = self:BarFactory(self.solarBar, "BACKGROUND", "ARTWORK", "Solar")
|
||||
self:SetBarCoord(self.solarBar, 0.5, true)
|
||||
|
||||
self.solarBar.bar:SetVertexColor(self:GetColor("EclipseSolar", 1))
|
||||
|
@ -255,7 +255,7 @@ function GlobalCoolDown.prototype:CreateFrame()
|
||||
end
|
||||
|
||||
function GlobalCoolDown.prototype:CreateLagBar()
|
||||
self.lagBar = self:BarFactory(self.lagBar, IceHUD.IceCore:DetermineStrata("LOW"), "OVERLAY", "Lag")
|
||||
self.lagBar = self:BarFactory(self.lagBar, "LOW", "OVERLAY", "Lag")
|
||||
|
||||
local r, g, b = self:GetColor("CastLag")
|
||||
if (self.settings.backgroundToggle) then
|
||||
|
@ -933,7 +933,7 @@ function PlayerHealth.prototype:CreateBackground(redraw)
|
||||
end
|
||||
|
||||
function PlayerHealth.prototype:CreateHealBar()
|
||||
self.healFrame = self:BarFactory(self.healFrame, IceHUD.IceCore:DetermineStrata("LOW"),"BACKGROUND", "Heal")
|
||||
self.healFrame = self:BarFactory(self.healFrame, "LOW","BACKGROUND", "Heal")
|
||||
|
||||
self.healFrame.bar:SetVertexColor(self:GetColor("PlayerHealthHealAmount", self.alpha * self.moduleSettings.healAlpha))
|
||||
|
||||
@ -945,7 +945,7 @@ function PlayerHealth.prototype:CreateHealBar()
|
||||
end
|
||||
|
||||
function PlayerHealth.prototype:CreateAbsorbBar()
|
||||
self.absorbFrame = self:BarFactory(self.absorbFrame, IceHUD.IceCore:DetermineStrata("LOW"),"BACKGROUND", "Absorb")
|
||||
self.absorbFrame = self:BarFactory(self.absorbFrame, "LOW","BACKGROUND", "Absorb")
|
||||
|
||||
self.absorbFrame.bar:SetVertexColor(self:GetColor("PlayerHealthAbsorbAmount", self.alpha * self.moduleSettings.absorbAlpha))
|
||||
|
||||
|
@ -199,7 +199,7 @@ function RollTheBones.prototype:CreateDurationBar()
|
||||
return
|
||||
end
|
||||
|
||||
self.durationFrame = self:BarFactory(self.durationFrame, IceHUD.IceCore:DetermineStrata("BACKGROUND"),"ARTWORK", "Duration")
|
||||
self.durationFrame = self:BarFactory(self.durationFrame, "BACKGROUND","ARTWORK", "Duration")
|
||||
|
||||
-- Rokiyo: Do we need to call this here?
|
||||
self.CurrScale = 0
|
||||
|
@ -214,7 +214,7 @@ function SliceAndDice.prototype:CreateFrame()
|
||||
end
|
||||
|
||||
function SliceAndDice.prototype:CreateDurationBar()
|
||||
self.durationFrame = self:BarFactory(self.durationFrame, IceHUD.IceCore:DetermineStrata("BACKGROUND"),"ARTWORK", "Duration")
|
||||
self.durationFrame = self:BarFactory(self.durationFrame, "BACKGROUND", "ARTWORK", "Duration")
|
||||
|
||||
-- Rokiyo: Do we need to call this here?
|
||||
self.CurrScale = 0
|
||||
|
@ -137,7 +137,7 @@ function StaggerBar.prototype:CreateFrame()
|
||||
end
|
||||
|
||||
function StaggerBar.prototype:CreateTimerBar()
|
||||
self.timerFrame = self:BarFactory(self.timerFrame, IceHUD.IceCore:DetermineStrata("MEDIUM"),"ARTWORK", "Timer")
|
||||
self.timerFrame = self:BarFactory(self.timerFrame, "MEDIUM", "ARTWORK", "Timer")
|
||||
|
||||
self.CurrScale = 0
|
||||
|
||||
|
@ -231,7 +231,7 @@ end
|
||||
|
||||
-- create the aggro range indicator bar
|
||||
function IceThreat.prototype:CreateAggroBar()
|
||||
self.aggroBar = self:BarFactory(self.aggroBar, IceHUD.IceCore:DetermineStrata("BACKGROUND"), "ARTWORK", "Aggro")
|
||||
self.aggroBar = self:BarFactory(self.aggroBar, "BACKGROUND", "ARTWORK", "Aggro")
|
||||
|
||||
local r, g, b = self:GetColor("ThreatPullAggro")
|
||||
if (self.settings.backgroundToggle) then
|
||||
@ -243,7 +243,7 @@ function IceThreat.prototype:CreateAggroBar()
|
||||
end
|
||||
|
||||
function IceThreat.prototype:CreateSecondThreatBar()
|
||||
self.secondThreatBar = self:BarFactory(self.secondThreatBar, IceHUD.IceCore:DetermineStrata("MEDIUM"), "OVERLAY", "SecondThreat")
|
||||
self.secondThreatBar = self:BarFactory(self.secondThreatBar, "MEDIUM", "OVERLAY", "SecondThreat")
|
||||
|
||||
self.secondThreatBar.bar:SetVertexColor(self:GetColor("ThreatSecondPlace", self.alpha * self.moduleSettings.secondPlaceThreatAlpha))
|
||||
|
||||
|
Reference in New Issue
Block a user