From 54469655f6726d22b27229d86af3da636df27f42 Mon Sep 17 00:00:00 2001 From: Parnic Date: Sat, 25 Oct 2014 23:02:33 -0500 Subject: [PATCH] Inactive mode "Darkened" on class power counters now displays a darkened background behind a full/partially full rune as well as the old behavior of showing empty runes as darkened forms. This aids in class powers like demonology warlocks who need to be able to see the full bar. --- modules/ClassPowerCounter.lua | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/modules/ClassPowerCounter.lua b/modules/ClassPowerCounter.lua index eb9f023..e160191 100644 --- a/modules/ClassPowerCounter.lua +++ b/modules/ClassPowerCounter.lua @@ -659,6 +659,11 @@ 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 @@ -691,8 +696,10 @@ function IceClassPowerCounter.prototype:CreateRune(i) self.frame.graphical[i] = CreateFrame("Frame", nil, self.frame) self.frame.graphical[i]:SetFrameStrata("BACKGROUND") - self.frame.graphical[i].rune = self.frame.graphical[i]:CreateTexture(nil, "LOW") + 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") @@ -713,10 +720,14 @@ 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 @@ -734,6 +745,7 @@ 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 @@ -754,6 +766,7 @@ function IceClassPowerCounter.prototype:SetupRuneTexture(rune) elseif self:GetRuneMode() == "Graphical Clean Circle" then self.frame.graphical[rune].rune:SetTexture(IceElement.TexturePath .. "ComboCleanCurves") end + self.frame.graphical[rune].runebg:SetTexture(self.frame.graphical[rune].rune:GetTexture()) end function IceClassPowerCounter.prototype:GetAlphaAdd()