From a201aa5149ad1c04e64a8ab3f4e59917c8552482 Mon Sep 17 00:00:00 2001 From: Parnic Date: Tue, 26 Jul 2016 21:37:45 -0500 Subject: [PATCH] Fixed incorrect texture drawing behind power counters Looks like at some point I modified how "darkened" inactive powers worked and ended up drawing two copies of the darkened power counter for each inactive power. "runebg" is superfluous since we're just setting the color of the actual counter to black and partially transparent instead. For some power counters, such as Paladins, the runebg texture was actually wrong and drawing the entire atlas rather than just the texture we wanted. --- modules/ClassPowerCounter.lua | 19 +------------------ 1 file changed, 1 insertion(+), 18 deletions(-) diff --git a/modules/ClassPowerCounter.lua b/modules/ClassPowerCounter.lua index 475db11..e0003eb 100644 --- a/modules/ClassPowerCounter.lua +++ b/modules/ClassPowerCounter.lua @@ -684,11 +684,6 @@ function IceClassPowerCounter.prototype:SetDisplayMode() for i=1, self.numRunes do self:SetupRuneTexture(i) self.frame.graphical[i]:Show() - if self.moduleSettings.inactiveDisplayMode == "Darkened" then - self.frame.graphical[i].runebg:Show() - else - self.frame.graphical[i].runebg:Hide() - end end end end @@ -723,8 +718,6 @@ function IceClassPowerCounter.prototype:CreateRune(i) self.frame.graphical[i].rune = self.frame.graphical[i]:CreateTexture(nil, "ARTWORK") self.frame.graphical[i].rune:SetVertexColor(0, 0, 0) - self.frame.graphical[i].runebg = self.frame.graphical[i]:CreateTexture(nil, "BACKGROUND") - self.frame.graphical[i].runebg:SetVertexColor(0, 0, 0) self:SetupRuneTexture(i) self.frame.graphical[i].shine = self.frame.graphical[i]:CreateTexture(nil, "OVERLAY") @@ -749,14 +742,10 @@ function IceClassPowerCounter.prototype:CreateRune(i) self.frame.graphical[i]:SetHeight(self.runeHeight) self.frame.graphical[i].rune:SetWidth(self.runeWidth) self.frame.graphical[i].rune:SetHeight(self.runeHeight) - self.frame.graphical[i].runebg:SetWidth(self.runeWidth) - self.frame.graphical[i].runebg:SetHeight(self.runeHeight) if self.currentGrowMode == self.growModes["width"] then self.frame.graphical[i].rune:SetPoint("LEFT", self.frame.graphical[i], "LEFT") - self.frame.graphical[i].runebg:SetPoint("LEFT", self.frame.graphical[i], "LEFT") else self.frame.graphical[i].rune:SetPoint("BOTTOM", self.frame.graphical[i], "BOTTOM") - self.frame.graphical[i].runebg:SetPoint("BOTTOM", self.frame.graphical[i], "BOTTOM") end end @@ -774,7 +763,6 @@ function IceClassPowerCounter.prototype:SetupRuneTexture(rune) -- make sure any texture aside from the special one is square and has the proper coordinates self.frame.graphical[rune].rune:SetTexCoord(a, b, c, d) - self.frame.graphical[rune].runebg:SetTexCoord(a, b, c, d) self.frame.graphical[rune]:SetWidth(width) self.frame:SetWidth(width*self.numRunes) local runeAdjust = rune - (self.numRunes / 2) - 0.5 @@ -784,8 +772,8 @@ function IceClassPowerCounter.prototype:SetupRuneTexture(rune) self.frame.graphical[rune]:SetPoint("CENTER", 0, -1 * (runeAdjust * (self.runeHeight-5) + runeAdjust + (runeAdjust * self.moduleSettings.runeGap))) end - local tex = self:GetRuneTexture(rune) if self:GetRuneMode() == "Graphical" then + local tex = self:GetRuneTexture(rune) if tex then self.frame.graphical[rune].rune:SetTexture(tex) else @@ -800,11 +788,6 @@ function IceClassPowerCounter.prototype:SetupRuneTexture(rune) elseif self:GetRuneMode() == "Graphical Clean Circle" then self.frame.graphical[rune].rune:SetTexture(IceElement.TexturePath .. "ComboCleanCurves") end - if tex then - self.frame.graphical[rune].runebg:SetTexture(tex) - else - self.frame.graphical[rune].runebg:SetAtlas(self.frame.graphical[rune].rune:GetAtlas()) - end end function IceClassPowerCounter.prototype:GetAlphaAdd()