From 415e4428a4ffc27689bdddb73db83c06e4bdcce0 Mon Sep 17 00:00:00 2001 From: shefki Date: Thu, 25 Mar 2010 01:04:47 +0000 Subject: [PATCH] Fix textures on count modules. --- modules/ComboPoints.lua | 32 +++++++++++++++++++------------- modules/CustomCount.lua | 30 ++++++++++++++++++------------ modules/LacerateCount.lua | 30 ++++++++++++++++++------------ modules/MaelstromCount.lua | 30 ++++++++++++++++++------------ modules/SunderCount.lua | 30 ++++++++++++++++++------------ 5 files changed, 91 insertions(+), 61 deletions(-) diff --git a/modules/ComboPoints.lua b/modules/ComboPoints.lua index f54a621..a3bd93e 100644 --- a/modules/ComboPoints.lua +++ b/modules/ComboPoints.lua @@ -250,18 +250,21 @@ function ComboPoints.prototype:CreateComboFrame(forceTextureUpdate) -- create backgrounds for i = 1, 5 do if (not self.frame.graphicalBG[i]) then - self.frame.graphicalBG[i] = CreateFrame("StatusBar", nil, self.frame) + local frame = CreateFrame("Frame", nil, self.frame) + self.frame.graphicalBG[i] = frame + frame.texture = frame:CreateTexture() + frame.texture:SetAllPoints(frame) end if forceTextureUpdate then if self.moduleSettings.comboMode == "Graphical Bar" then - self.frame.graphicalBG[i]:SetStatusBarTexture(IceElement.TexturePath .. "ComboBG") + self.frame.graphicalBG[i].texture:SetTexture(IceElement.TexturePath .. "ComboBG") elseif self.moduleSettings.comboMode == "Graphical Circle" then - self.frame.graphicalBG[i]:SetStatusBarTexture(IceElement.TexturePath .. "ComboRoundBG") + self.frame.graphicalBG[i].texture:SetTexture(IceElement.TexturePath .. "ComboRoundBG") elseif self.moduleSettings.comboMode == "Graphical Glow" then - self.frame.graphicalBG[i]:SetStatusBarTexture(IceElement.TexturePath .. "ComboGlowBG") + self.frame.graphicalBG[i].texture:SetTexture(IceElement.TexturePath .. "ComboGlowBG") elseif self.moduleSettings.comboMode == "Graphical Clean Circle" then - self.frame.graphicalBG[i]:SetStatusBarTexture(IceElement.TexturePath .. "ComboCleanCurvesBG") + self.frame.graphicalBG[i].texture:SetTexture(IceElement.TexturePath .. "ComboCleanCurvesBG") end end @@ -274,7 +277,7 @@ function ComboPoints.prototype:CreateComboFrame(forceTextureUpdate) self.frame.graphicalBG[i]:SetPoint("TOPLEFT", 0, -1 * (((i-1) * (self.comboSize-5)) + (i-1) + ((i-1) * self.moduleSettings.comboGap))) end self.frame.graphicalBG[i]:SetAlpha(0.15) - self.frame.graphicalBG[i]:SetStatusBarColor(self:GetColor("ComboPoints")) + self.frame.graphicalBG[i].texture:SetVertexColor(self:GetColor("ComboPoints")) self.frame.graphicalBG[i]:Hide() end @@ -282,18 +285,21 @@ function ComboPoints.prototype:CreateComboFrame(forceTextureUpdate) -- create combo points for i = 1, 5 do if (not self.frame.graphical[i]) then - self.frame.graphical[i] = CreateFrame("StatusBar", nil, self.frame) + local frame = CreateFrame("Frame", nil, self.frame) + self.frame.graphical[i] = frame + frame.texture = frame:CreateTexture() + frame.texture:SetAllPoints(frame) end if forceTextureUpdate then if self.moduleSettings.comboMode == "Graphical Bar" then - self.frame.graphical[i]:SetStatusBarTexture(IceElement.TexturePath .. "Combo") + self.frame.graphical[i].texture:SetTexture(IceElement.TexturePath .. "Combo") elseif self.moduleSettings.comboMode == "Graphical Circle" then - self.frame.graphical[i]:SetStatusBarTexture(IceElement.TexturePath .. "ComboRound") + self.frame.graphical[i].texture:SetTexture(IceElement.TexturePath .. "ComboRound") elseif self.moduleSettings.comboMode == "Graphical Glow" then - self.frame.graphical[i]:SetStatusBarTexture(IceElement.TexturePath .. "ComboGlow") + self.frame.graphical[i].texture:SetTexture(IceElement.TexturePath .. "ComboGlow") elseif self.moduleSettings.comboMode == "Graphical Clean Circle" then - self.frame.graphical[i]:SetStatusBarTexture(IceElement.TexturePath .. "ComboCleanCurves") + self.frame.graphical[i].texture:SetTexture(IceElement.TexturePath .. "ComboCleanCurves") end end @@ -304,7 +310,7 @@ function ComboPoints.prototype:CreateComboFrame(forceTextureUpdate) if (self.moduleSettings.gradient) then g = g - (0.15*i) end - self.frame.graphical[i]:SetStatusBarColor(r, g, b) + self.frame.graphical[i].texture:SetVertexColor(r, g, b) self.frame.graphical[i]:Hide() end @@ -362,4 +368,4 @@ end --local _, unitClass = UnitClass("player") --if (unitClass == "DRUID" or unitClass == "ROGUE") then IceHUD.ComboPoints = ComboPoints:new() ---end \ No newline at end of file +--end diff --git a/modules/CustomCount.lua b/modules/CustomCount.lua index fb81478..d7d1c97 100644 --- a/modules/CustomCount.lua +++ b/modules/CustomCount.lua @@ -432,18 +432,21 @@ function IceCustomCount.prototype:CreateCustomFrame(doTextureUpdate) -- create backgrounds for i = 1, self.moduleSettings.maxCount do if (not self.frame.graphicalBG[i]) then - self.frame.graphicalBG[i] = CreateFrame("StatusBar", nil, self.frame) + local frame = CreateFrame("Frame", nil, self.frame) + self.frame.graphicalBG[i] = frame + frame.texture = frame:CreateTexture() + frame.texture:SetAllPoints(frame) end if doTextureUpdate then if self.moduleSettings.countMode == "Graphical Bar" then - self.frame.graphicalBG[i]:SetStatusBarTexture(IceElement.TexturePath .. "ComboBG") + self.frame.graphicalBG[i].texture:SetTexture(IceElement.TexturePath .. "ComboBG") elseif self.moduleSettings.countMode == "Graphical Circle" then - self.frame.graphicalBG[i]:SetStatusBarTexture(IceElement.TexturePath .. "ComboRoundBG") + self.frame.graphicalBG[i].texture:SetTexture(IceElement.TexturePath .. "ComboRoundBG") elseif self.moduleSettings.countMode == "Graphical Glow" then - self.frame.graphicalBG[i]:SetStatusBarTexture(IceElement.TexturePath .. "ComboGlowBG") + self.frame.graphicalBG[i].texture:SetTexture(IceElement.TexturePath .. "ComboGlowBG") elseif self.moduleSettings.countMode == "Graphical Clean Circle" then - self.frame.graphicalBG[i]:SetStatusBarTexture(IceElement.TexturePath .. "ComboCleanCurvesBG") + self.frame.graphicalBG[i].texture:SetTexture(IceElement.TexturePath .. "ComboCleanCurvesBG") end end @@ -463,18 +466,21 @@ function IceCustomCount.prototype:CreateCustomFrame(doTextureUpdate) -- create counts for i = 1, self.moduleSettings.maxCount do if (not self.frame.graphical[i]) then - self.frame.graphical[i] = CreateFrame("StatusBar", nil, self.frame) + local frame = CreateFrame("Frame", nil, self.frame) + self.frame.graphical[i] = frame + frame.texture = frame:CreateTexture() + frame.texture:SetAllPoints(frame) end if doTextureUpdate then if self.moduleSettings.countMode == "Graphical Bar" then - self.frame.graphical[i]:SetStatusBarTexture(IceElement.TexturePath .. "Combo") + self.frame.graphical[i].texture:SetTexture(IceElement.TexturePath .. "Combo") elseif self.moduleSettings.countMode == "Graphical Circle" then - self.frame.graphical[i]:SetStatusBarTexture(IceElement.TexturePath .. "ComboRound") + self.frame.graphical[i].texture:SetTexture(IceElement.TexturePath .. "ComboRound") elseif self.moduleSettings.countMode == "Graphical Glow" then - self.frame.graphical[i]:SetStatusBarTexture(IceElement.TexturePath .. "ComboGlow") + self.frame.graphical[i].texture:SetTexture(IceElement.TexturePath .. "ComboGlow") elseif self.moduleSettings.countMode == "Graphical Clean Circle" then - self.frame.graphical[i]:SetStatusBarTexture(IceElement.TexturePath .. "ComboCleanCurves") + self.frame.graphical[i].texture:SetTexture(IceElement.TexturePath .. "ComboCleanCurves") end end @@ -490,13 +496,13 @@ end function IceCustomCount.prototype:SetCustomColor() for i=1, self.moduleSettings.maxCount do - self.frame.graphicalBG[i]:SetStatusBarColor(self:GetCustomColor()) + self.frame.graphicalBG[i].texture:SetVertexColor(self:GetCustomColor()) local r, g, b = self:GetCustomColor() if (self.moduleSettings.gradient) then r,g,b = self:GetGradientColor(i) end - self.frame.graphical[i]:SetStatusBarColor(r, g, b) + self.frame.graphical[i].texture:SetVertexColor(r, g, b) end end diff --git a/modules/LacerateCount.lua b/modules/LacerateCount.lua index 1d60608..6e5b270 100644 --- a/modules/LacerateCount.lua +++ b/modules/LacerateCount.lua @@ -220,18 +220,21 @@ function LacerateCount.prototype:CreateLacerateFrame(doTextureUpdate) -- create backgrounds for i = 1, 5 do if (not self.frame.graphicalBG[i]) then - self.frame.graphicalBG[i] = CreateFrame("StatusBar", nil, self.frame) + local frame = CreateFrame("Frame", nil, self.frame) + self.frame.graphicalBG[i] = frame + frame.texture = frame:CreateTexture() + frame.texture:SetAllPoints(frame) end if doTextureUpdate then if self.moduleSettings.lacerateMode == "Graphical Bar" then - self.frame.graphicalBG[i]:SetStatusBarTexture(IceElement.TexturePath .. "ComboBG") + self.frame.graphicalBG[i].texture:SetTexture(IceElement.TexturePath .. "ComboBG") elseif self.moduleSettings.lacerateMode == "Graphical Circle" then - self.frame.graphicalBG[i]:SetStatusBarTexture(IceElement.TexturePath .. "ComboRoundBG") + self.frame.graphicalBG[i].texture:SetTexture(IceElement.TexturePath .. "ComboRoundBG") elseif self.moduleSettings.lacerateMode == "Graphical Glow" then - self.frame.graphicalBG[i]:SetStatusBarTexture(IceElement.TexturePath .. "ComboGlowBG") + self.frame.graphicalBG[i].texture:SetTexture(IceElement.TexturePath .. "ComboGlowBG") elseif self.moduleSettings.lacerateMode == "Graphical Clean Circle" then - self.frame.graphicalBG[i]:SetStatusBarTexture(IceElement.TexturePath .. "ComboCleanCurvesBG") + self.frame.graphicalBG[i].texture:SetTexture(IceElement.TexturePath .. "ComboCleanCurvesBG") end end @@ -240,7 +243,7 @@ function LacerateCount.prototype:CreateLacerateFrame(doTextureUpdate) self.frame.graphicalBG[i]:SetHeight(self.lacerateSize) self.frame.graphicalBG[i]:SetPoint("TOPLEFT", (i-1) * (self.lacerateSize-5) + (i-1) + ((i-1) * self.moduleSettings.lacerateGap), 0) self.frame.graphicalBG[i]:SetAlpha(0.15) - self.frame.graphicalBG[i]:SetStatusBarColor(self:GetColor("LacerateCount")) + self.frame.graphicalBG[i].texture:SetVertexColor(self:GetColor("LacerateCount")) self.frame.graphicalBG[i]:Hide() end @@ -248,18 +251,21 @@ function LacerateCount.prototype:CreateLacerateFrame(doTextureUpdate) -- create lacerates for i = 1, 5 do if (not self.frame.graphical[i]) then - self.frame.graphical[i] = CreateFrame("StatusBar", nil, self.frame) + local frame = CreateFrame("Frame", nil, self.frame) + self.frame.graphical[i] = frame + frame.texture = frame:CreateTexture() + frame.texture:SetAllPoints(frame) end if doTextureUpdate then if self.moduleSettings.lacerateMode == "Graphical Bar" then - self.frame.graphical[i]:SetStatusBarTexture(IceElement.TexturePath .. "Combo") + self.frame.graphical[i].texture:SetTexture(IceElement.TexturePath .. "Combo") elseif self.moduleSettings.lacerateMode == "Graphical Circle" then - self.frame.graphical[i]:SetStatusBarTexture(IceElement.TexturePath .. "ComboRound") + self.frame.graphical[i].texture:SetTexture(IceElement.TexturePath .. "ComboRound") elseif self.moduleSettings.lacerateMode == "Graphical Glow" then - self.frame.graphical[i]:SetStatusBarTexture(IceElement.TexturePath .. "ComboGlow") + self.frame.graphical[i].texture:SetTexture(IceElement.TexturePath .. "ComboGlow") elseif self.moduleSettings.lacerateMode == "Graphical Clean Circle" then - self.frame.graphical[i]:SetStatusBarTexture(IceElement.TexturePath .. "ComboCleanCurves") + self.frame.graphical[i].texture:SetTexture(IceElement.TexturePath .. "ComboCleanCurves") end end @@ -270,7 +276,7 @@ function LacerateCount.prototype:CreateLacerateFrame(doTextureUpdate) if (self.moduleSettings.gradient) then g = g - (0.15*i) end - self.frame.graphical[i]:SetStatusBarColor(r, g, b) + self.frame.graphical[i].texture:SetVertexColor(r, g, b) self.frame.graphical[i]:Hide() end diff --git a/modules/MaelstromCount.lua b/modules/MaelstromCount.lua index d34941f..0596d44 100644 --- a/modules/MaelstromCount.lua +++ b/modules/MaelstromCount.lua @@ -194,18 +194,21 @@ function MaelstromCount.prototype:CreateMaelstromFrame(doTextureUpdate) -- create backgrounds for i = 1, 5 do if (not self.frame.graphicalBG[i]) then - self.frame.graphicalBG[i] = CreateFrame("StatusBar", nil, self.frame) + local frame = CreateFrame("Frame", nil, self.frame) + self.frame.graphicalBG[i] = frame + frame.texture = frame:CreateTexture() + frame.texture:SetAllPoints(frame) end if doTextureUpdate then if self.moduleSettings.maelstromMode == "Graphical Bar" then - self.frame.graphicalBG[i]:SetStatusBarTexture(IceElement.TexturePath .. "ComboBG") + self.frame.graphicalBG[i].texture:SetTexture(IceElement.TexturePath .. "ComboBG") elseif self.moduleSettings.maelstromMode == "Graphical Circle" then - self.frame.graphicalBG[i]:SetStatusBarTexture(IceElement.TexturePath .. "ComboRoundBG") + self.frame.graphicalBG[i].texture:SetTexture(IceElement.TexturePath .. "ComboRoundBG") elseif self.moduleSettings.maelstromMode == "Graphical Glow" then - self.frame.graphicalBG[i]:SetStatusBarTexture(IceElement.TexturePath .. "ComboGlowBG") + self.frame.graphicalBG[i].texture:SetTexture(IceElement.TexturePath .. "ComboGlowBG") elseif self.moduleSettings.maelstromMode == "Graphical Clean Circle" then - self.frame.graphicalBG[i]:SetStatusBarTexture(IceElement.TexturePath .. "ComboCleanCurvesBG") + self.frame.graphicalBG[i].texture:SetTexture(IceElement.TexturePath .. "ComboCleanCurvesBG") end end @@ -214,7 +217,7 @@ function MaelstromCount.prototype:CreateMaelstromFrame(doTextureUpdate) self.frame.graphicalBG[i]:SetHeight(self.maelstromSize) self.frame.graphicalBG[i]:SetPoint("TOPLEFT", (i-1) * (self.maelstromSize-5) + (i-1) + ((i-1) * self.moduleSettings.maelstromGap), 0) self.frame.graphicalBG[i]:SetAlpha(0.15) - self.frame.graphicalBG[i]:SetStatusBarColor(self:GetColor("MaelstromCount")) + self.frame.graphicalBG[i].texture:SetVertexColor(self:GetColor("MaelstromCount")) self.frame.graphicalBG[i]:Hide() end @@ -222,18 +225,21 @@ function MaelstromCount.prototype:CreateMaelstromFrame(doTextureUpdate) -- create maelstroms for i = 1, 5 do if (not self.frame.graphical[i]) then - self.frame.graphical[i] = CreateFrame("StatusBar", nil, self.frame) + local frame = CreateFrame("Frame", nil, self.frame) + self.frame.graphical[i] = frame + frame.texture = frame:CreateTexture() + frame.texture:SetAllPoints(frame) end if doTextureUpdate then if self.moduleSettings.maelstromMode == "Graphical Bar" then - self.frame.graphical[i]:SetStatusBarTexture(IceElement.TexturePath .. "Combo") + self.frame.graphical[i].texture:SetTexture(IceElement.TexturePath .. "Combo") elseif self.moduleSettings.maelstromMode == "Graphical Circle" then - self.frame.graphical[i]:SetStatusBarTexture(IceElement.TexturePath .. "ComboRound") + self.frame.graphical[i].texture:SetTexture(IceElement.TexturePath .. "ComboRound") elseif self.moduleSettings.maelstromMode == "Graphical Glow" then - self.frame.graphical[i]:SetStatusBarTexture(IceElement.TexturePath .. "ComboGlow") + self.frame.graphical[i].texture:SetTexture(IceElement.TexturePath .. "ComboGlow") elseif self.moduleSettings.maelstromMode == "Graphical Clean Circle" then - self.frame.graphical[i]:SetStatusBarTexture(IceElement.TexturePath .. "ComboCleanCurves") + self.frame.graphical[i].texture:SetTexture(IceElement.TexturePath .. "ComboCleanCurves") end end @@ -244,7 +250,7 @@ function MaelstromCount.prototype:CreateMaelstromFrame(doTextureUpdate) if (self.moduleSettings.gradient) then g = g - (0.15*i) end - self.frame.graphical[i]:SetStatusBarColor(r, g, b) + self.frame.graphical[i].texture:SetVertexColor(r, g, b) self.frame.graphical[i]:Hide() end diff --git a/modules/SunderCount.lua b/modules/SunderCount.lua index 41e0764..0ed11b3 100644 --- a/modules/SunderCount.lua +++ b/modules/SunderCount.lua @@ -199,18 +199,21 @@ function SunderCount.prototype:CreateSunderFrame(doTextureUpdate) -- create backgrounds for i = 1, 5 do if (not self.frame.graphicalBG[i]) then - self.frame.graphicalBG[i] = CreateFrame("StatusBar", nil, self.frame) + local frame = CreateFrame("Frame", nil, self.frame) + self.frame.graphicalBG[i] = frame + frame.texture = frame:CreateTexture() + frame.texture:SetAllPoints(frame) end if doTextureUpdate then if self.moduleSettings.sunderMode == "Graphical Bar" then - self.frame.graphicalBG[i]:SetStatusBarTexture(IceElement.TexturePath .. "ComboBG") + self.frame.graphicalBG[i].texture:SetTexture(IceElement.TexturePath .. "ComboBG") elseif self.moduleSettings.sunderMode == "Graphical Circle" then - self.frame.graphicalBG[i]:SetStatusBarTexture(IceElement.TexturePath .. "ComboRoundBG") + self.frame.graphicalBG[i].texture:SetTexture(IceElement.TexturePath .. "ComboRoundBG") elseif self.moduleSettings.sunderMode == "Graphical Glow" then - self.frame.graphicalBG[i]:SetStatusBarTexture(IceElement.TexturePath .. "ComboGlowBG") + self.frame.graphicalBG[i].texture:SetTexture(IceElement.TexturePath .. "ComboGlowBG") elseif self.moduleSettings.sunderMode == "Graphical Clean Circle" then - self.frame.graphicalBG[i]:SetStatusBarTexture(IceElement.TexturePath .. "ComboCleanCurvesBG") + self.frame.graphicalBG[i].texture:SetTexture(IceElement.TexturePath .. "ComboCleanCurvesBG") end end @@ -219,7 +222,7 @@ function SunderCount.prototype:CreateSunderFrame(doTextureUpdate) self.frame.graphicalBG[i]:SetHeight(self.sunderSize) self.frame.graphicalBG[i]:SetPoint("TOPLEFT", (i-1) * (self.sunderSize-5) + (i-1) + ((i-1) * self.moduleSettings.sunderGap), 0) self.frame.graphicalBG[i]:SetAlpha(0.15) - self.frame.graphicalBG[i]:SetStatusBarColor(self:GetColor("SunderCount")) + self.frame.graphicalBG[i].texture:SetColor(self:GetColor("SunderCount")) self.frame.graphicalBG[i]:Hide() end @@ -227,18 +230,21 @@ function SunderCount.prototype:CreateSunderFrame(doTextureUpdate) -- create sunders for i = 1, 5 do if (not self.frame.graphical[i]) then - self.frame.graphical[i] = CreateFrame("StatusBar", nil, self.frame) + local frame = CreateFrame("Frame", nil, self.frame) + self.frame.graphical[i] = frame + frame.texture = frame:CreateTexture() + frame.texture:SetAllPoints(frame) end if doTextureUpdate then if self.moduleSettings.sunderMode == "Graphical Bar" then - self.frame.graphical[i]:SetStatusBarTexture(IceElement.TexturePath .. "Combo") + self.frame.graphical[i].texture:SetTexture(IceElement.TexturePath .. "Combo") elseif self.moduleSettings.sunderMode == "Graphical Circle" then - self.frame.graphical[i]:SetStatusBarTexture(IceElement.TexturePath .. "ComboRound") + self.frame.graphical[i].texture:SetTexture(IceElement.TexturePath .. "ComboRound") elseif self.moduleSettings.sunderMode == "Graphical Glow" then - self.frame.graphical[i]:SetStatusBarTexture(IceElement.TexturePath .. "ComboGlow") + self.frame.graphical[i].texture:SetTexture(IceElement.TexturePath .. "ComboGlow") elseif self.moduleSettings.sunderMode == "Graphical Clean Circle" then - self.frame.graphical[i]:SetStatusBarTexture(IceElement.TexturePath .. "ComboCleanCurves") + self.frame.graphical[i].texture:SetTexture(IceElement.TexturePath .. "ComboCleanCurves") end end @@ -249,7 +255,7 @@ function SunderCount.prototype:CreateSunderFrame(doTextureUpdate) if (self.moduleSettings.gradient) then g = g - (0.15*i) end - self.frame.graphical[i]:SetStatusBarColor(r, g, b) + self.frame.graphical[i].texture:SetVertexColor(r, g, b) self.frame.graphical[i]:Hide() end