diff --git a/Modules/Auras.lua b/Modules/Auras.lua index b1f0900..63c2b4f 100644 --- a/Modules/Auras.lua +++ b/Modules/Auras.lua @@ -557,6 +557,22 @@ function Auras:GetOptions() order = 4, width = "full", }), + auraCooldownNumberAlpha = { + type = "range", + name = L["Cooldown number alpha"], + min = 0, + max = 1, + step = 0.1, + order = 5, + width = "full", + set = function(info, value) + Gladdy.db.auraFontColor.a = value + Gladdy:UpdateFrame() + end, + get = function(info) + return Gladdy.db.auraFontColor.a + end, + }, } }, font = { diff --git a/Modules/BuffsDebuffs.lua b/Modules/BuffsDebuffs.lua index 61eed84..0a4faeb 100644 --- a/Modules/BuffsDebuffs.lua +++ b/Modules/BuffsDebuffs.lua @@ -279,7 +279,7 @@ local function styleIcon(aura, auraType) aura.cooldown:SetFont(Gladdy:SMFetch("font", "buffsFont"), (Gladdy.db.buffsIconSize/2 - 1) * Gladdy.db.buffsFontScale, "OUTLINE") aura.cooldown:SetTextColor(Gladdy.db.buffsFontColor.r, Gladdy.db.buffsFontColor.g, Gladdy.db.buffsFontColor.b, Gladdy.db.buffsFontColor.a) aura.stacks:SetFont(Gladdy:SMFetch("font", "buffsFont"), (Gladdy.db.buffsIconSize/3 - 1) * Gladdy.db.buffsFontScale, "OUTLINE") - aura.stacks:SetTextColor(Gladdy.db.buffsFontColor.r, Gladdy.db.buffsFontColor.g, Gladdy.db.buffsFontColor.b, Gladdy.db.buffsFontColor.a) + aura.stacks:SetTextColor(Gladdy.db.buffsFontColor.r, Gladdy.db.buffsFontColor.g, Gladdy.db.buffsFontColor.b, 1) end function BuffsDebuffs:UpdateFrame(unit) @@ -486,15 +486,15 @@ local function iconTimer(auraFrame, elapsed) auraFrame.timeLeft = timeLeftMilliSec if Gladdy.db.buffsDynamicColor then if timeLeftSec >= 60 then - auraFrame.cooldown:SetTextColor(0.7, 1, 0) + auraFrame.cooldown:SetTextColor(0.7, 1, 0, Gladdy.db.buffsFontColor.a) elseif timeLeftSec < 60 and timeLeftSec >= 11 then - auraFrame.cooldown:SetTextColor(0.7, 1, 0) + auraFrame.cooldown:SetTextColor(0.7, 1, 0, Gladdy.db.buffsFontColor.a) elseif timeLeftSec <= 10 and timeLeftSec >= 5 then - auraFrame.cooldown:SetTextColor(1, 0.7, 0) + auraFrame.cooldown:SetTextColor(1, 0.7, 0, Gladdy.db.buffsFontColor.a) elseif timeLeftSec <= 4 and timeLeftSec >= 3 then - auraFrame.cooldown:SetTextColor(1, 0, 0) + auraFrame.cooldown:SetTextColor(1, 0, 0, Gladdy.db.buffsFontColor.a) elseif timeLeftMilliSec <= 3 and timeLeftMilliSec > 0 then - auraFrame.cooldown:SetTextColor(1, 0, 0) + auraFrame.cooldown:SetTextColor(1, 0, 0, Gladdy.db.buffsFontColor.a) end end if timeLeftMilliSec < 0 then @@ -911,6 +911,22 @@ function BuffsDebuffs:GetOptions() order = 10, width = "full", }), + buffsCooldownNumberAlpha = { + type = "range", + name = L["Cooldown number alpha"], + min = 0, + max = 1, + step = 0.1, + order = 11, + width = "full", + set = function(info, value) + Gladdy.db.buffsFontColor.a = value + Gladdy:UpdateFrame() + end, + get = function(info) + return Gladdy.db.buffsFontColor.a + end, + }, }, }, font = { diff --git a/Modules/Cooldowns.lua b/Modules/Cooldowns.lua index 97c0a15..c2ed7b9 100644 --- a/Modules/Cooldowns.lua +++ b/Modules/Cooldowns.lua @@ -663,6 +663,22 @@ function Cooldowns:GetOptions() order = 9, width = "full", }), + cooldownCooldownNumberAlpha = { + type = "range", + name = L["Cooldown number alpha"], + min = 0, + max = 1, + step = 0.1, + order = 10, + width = "full", + set = function(info, value) + Gladdy.db.cooldownFontColor.a = value + Gladdy:UpdateFrame() + end, + get = function(info) + return Gladdy.db.cooldownFontColor.a + end, + }, }, }, font = { diff --git a/Modules/Diminishings.lua b/Modules/Diminishings.lua index 780c188..e999943 100644 --- a/Modules/Diminishings.lua +++ b/Modules/Diminishings.lua @@ -456,6 +456,22 @@ function Diminishings:GetOptions() order = 9, width = "full", }), + drCooldownNumberAlpha = { + type = "range", + name = L["Cooldown number alpha"], + min = 0, + max = 1, + step = 0.1, + order = 10, + width = "full", + set = function(info, value) + Gladdy.db.drFontColor.a = value + Gladdy:UpdateFrame() + end, + get = function(info) + return Gladdy.db.drFontColor.a + end, + }, }, }, font = { diff --git a/Modules/Racial.lua b/Modules/Racial.lua index 94fb049..aaf3731 100644 --- a/Modules/Racial.lua +++ b/Modules/Racial.lua @@ -19,6 +19,7 @@ local Racial = Gladdy:NewModule("Racial", nil, { racialBorderColor = { r = 0, g = 0, b = 0, a = 1 }, racialDisableCircle = false, racialCooldownAlpha = 1, + racialCooldownNumberAlpha = 1, }) local ANCHORS = { ["LEFT"] = "RIGHT", ["RIGHT"] = "LEFT", ["BOTTOM"] = "TOP", ["TOP"] = "BOTTOM"} @@ -43,19 +44,19 @@ local function iconTimer(self,elapsed) local timeLeft = ceil(self.timeLeft) if timeLeft >= 60 then - self.cooldownFont:SetTextColor(1, 1, 0) + self.cooldownFont:SetTextColor(1, 1, 0, Gladdy.db.racialCooldownNumberAlpha) self.cooldownFont:SetFont(Gladdy:SMFetch("font", "racialFont"), (self:GetWidth()/2 - 0.15* self:GetWidth()) * Gladdy.db.racialFontScale, "OUTLINE") elseif timeLeft < 60 and timeLeft >= 30 then - self.cooldownFont:SetTextColor(1, 1, 0) + self.cooldownFont:SetTextColor(1, 1, 0, Gladdy.db.racialCooldownNumberAlpha) self.cooldownFont:SetFont(Gladdy:SMFetch("font", "racialFont"), (self:GetWidth()/2 - 1) * Gladdy.db.racialFontScale, "OUTLINE") elseif timeLeft < 30 and timeLeft >= 11 then - self.cooldownFont:SetTextColor(1, 0.7, 0) + self.cooldownFont:SetTextColor(1, 0.7, 0, Gladdy.db.racialCooldownNumberAlpha) self.cooldownFont:SetFont(Gladdy:SMFetch("font", "racialFont"), (self:GetWidth()/2 - 1) * Gladdy.db.racialFontScale, "OUTLINE") elseif timeLeft < 10 and timeLeft >= 5 then - self.cooldownFont:SetTextColor(1, 0.7, 0) + self.cooldownFont:SetTextColor(1, 0.7, 0, Gladdy.db.racialCooldownNumberAlpha) self.cooldownFont:SetFont(Gladdy:SMFetch("font", "racialFont"), (self:GetWidth()/2 - 1) * Gladdy.db.racialFontScale, "OUTLINE") elseif timeLeft < 5 and timeLeft > 0 then - self.cooldownFont:SetTextColor(1, 0, 0) + self.cooldownFont:SetTextColor(1, 0, 0, Gladdy.db.racialCooldownNumberAlpha) self.cooldownFont:SetFont(Gladdy:SMFetch("font", "racialFont"), (self:GetWidth()/2 - 1) * Gladdy.db.racialFontScale, "OUTLINE") end Gladdy:FormatTimer(self.cooldownFont, self.timeLeft, self.timeLeft < 10, true) @@ -270,6 +271,15 @@ function Racial:GetOptions() order = 8, width = "full", }), + racialCooldownNumberAlpha = Gladdy:option({ + type = "range", + name = L["Cooldown number alpha"], + min = 0, + max = 1, + step = 0.1, + order = 9, + width = "full", + }), }, }, font = { diff --git a/Modules/Trinket.lua b/Modules/Trinket.lua index 3a71c6a..53126e4 100644 --- a/Modules/Trinket.lua +++ b/Modules/Trinket.lua @@ -17,6 +17,7 @@ local Trinket = Gladdy:NewModule("Trinket", nil, { trinketBorderColor = { r = 0, g = 0, b = 0, a = 1 }, trinketDisableCircle = false, trinketCooldownAlpha = 1, + trinketCooldownNumberAlpha = 1, }) LibStub("AceComm-3.0"):Embed(Trinket) @@ -39,19 +40,19 @@ local function iconTimer(self, elapsed) local timeLeft = ceil(self.timeLeft) if timeLeft >= 60 then - self.cooldownFont:SetTextColor(1, 1, 0) + self.cooldownFont:SetTextColor(1, 1, 0, Gladdy.db.trinketCooldownNumberAlpha) self.cooldownFont:SetFont(Gladdy:SMFetch("font", "trinketFont"), (self:GetWidth()/2 - 0.15*self:GetWidth()) * Gladdy.db.trinketFontScale, "OUTLINE") elseif timeLeft < 60 and timeLeft >= 30 then - self.cooldownFont:SetTextColor(1, 1, 0) + self.cooldownFont:SetTextColor(1, 1, 0, Gladdy.db.trinketCooldownNumberAlpha) self.cooldownFont:SetFont(Gladdy:SMFetch("font", "trinketFont"), (self:GetWidth()/2 - 1) * Gladdy.db.trinketFontScale, "OUTLINE") elseif timeLeft < 30 and timeLeft >= 11 then - self.cooldownFont:SetTextColor(1, 0.7, 0) + self.cooldownFont:SetTextColor(1, 0.7, 0, Gladdy.db.trinketCooldownNumberAlpha) self.cooldownFont:SetFont(Gladdy:SMFetch("font", "trinketFont"), (self:GetWidth()/2 - 1) * Gladdy.db.trinketFontScale, "OUTLINE") elseif timeLeft <= 10 and timeLeft >= 5 then - self.cooldownFont:SetTextColor(1, 0.7, 0) + self.cooldownFont:SetTextColor(1, 0.7, 0, Gladdy.db.trinketCooldownNumberAlpha) self.cooldownFont:SetFont(Gladdy:SMFetch("font", "trinketFont"), (self:GetWidth()/2 - 1) * Gladdy.db.trinketFontScale, "OUTLINE") elseif timeLeft < 5 and timeLeft > 0 then - self.cooldownFont:SetTextColor(1, 0, 0) + self.cooldownFont:SetTextColor(1, 0, 0, Gladdy.db.trinketCooldownNumberAlpha) self.cooldownFont:SetFont(Gladdy:SMFetch("font", "trinketFont"), (self:GetWidth()/2 - 1) * Gladdy.db.trinketFontScale, "OUTLINE") end Gladdy:FormatTimer(self.cooldownFont, self.timeLeft, self.timeLeft < 10, true) @@ -276,6 +277,15 @@ function Trinket:GetOptions() order = 8, width = "full", }), + trinketCooldownNumberAlpha = Gladdy:option({ + type = "range", + name = L["Cooldown number alpha"], + min = 0, + max = 1, + step = 0.1, + order = 9, + width = "full", + }), }, }, font = {