Fix textures on count modules.

This commit is contained in:
shefki
2010-03-25 01:04:47 +00:00
parent 38d3b17ec2
commit 415e4428a4
5 changed files with 91 additions and 61 deletions

View File

@ -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