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