add option cooldown number alpha
This commit is contained in:
parent
548234aaaa
commit
ff4799ceef
@ -557,6 +557,22 @@ function Auras:GetOptions()
|
|||||||
order = 4,
|
order = 4,
|
||||||
width = "full",
|
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 = {
|
font = {
|
||||||
|
@ -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: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.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: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
|
end
|
||||||
|
|
||||||
function BuffsDebuffs:UpdateFrame(unit)
|
function BuffsDebuffs:UpdateFrame(unit)
|
||||||
@ -486,15 +486,15 @@ local function iconTimer(auraFrame, elapsed)
|
|||||||
auraFrame.timeLeft = timeLeftMilliSec
|
auraFrame.timeLeft = timeLeftMilliSec
|
||||||
if Gladdy.db.buffsDynamicColor then
|
if Gladdy.db.buffsDynamicColor then
|
||||||
if timeLeftSec >= 60 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
|
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
|
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
|
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
|
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
|
||||||
end
|
end
|
||||||
if timeLeftMilliSec < 0 then
|
if timeLeftMilliSec < 0 then
|
||||||
@ -911,6 +911,22 @@ function BuffsDebuffs:GetOptions()
|
|||||||
order = 10,
|
order = 10,
|
||||||
width = "full",
|
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 = {
|
font = {
|
||||||
|
@ -663,6 +663,22 @@ function Cooldowns:GetOptions()
|
|||||||
order = 9,
|
order = 9,
|
||||||
width = "full",
|
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 = {
|
font = {
|
||||||
|
@ -456,6 +456,22 @@ function Diminishings:GetOptions()
|
|||||||
order = 9,
|
order = 9,
|
||||||
width = "full",
|
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 = {
|
font = {
|
||||||
|
@ -19,6 +19,7 @@ local Racial = Gladdy:NewModule("Racial", nil, {
|
|||||||
racialBorderColor = { r = 0, g = 0, b = 0, a = 1 },
|
racialBorderColor = { r = 0, g = 0, b = 0, a = 1 },
|
||||||
racialDisableCircle = false,
|
racialDisableCircle = false,
|
||||||
racialCooldownAlpha = 1,
|
racialCooldownAlpha = 1,
|
||||||
|
racialCooldownNumberAlpha = 1,
|
||||||
})
|
})
|
||||||
|
|
||||||
local ANCHORS = { ["LEFT"] = "RIGHT", ["RIGHT"] = "LEFT", ["BOTTOM"] = "TOP", ["TOP"] = "BOTTOM"}
|
local ANCHORS = { ["LEFT"] = "RIGHT", ["RIGHT"] = "LEFT", ["BOTTOM"] = "TOP", ["TOP"] = "BOTTOM"}
|
||||||
@ -43,19 +44,19 @@ local function iconTimer(self,elapsed)
|
|||||||
local timeLeft = ceil(self.timeLeft)
|
local timeLeft = ceil(self.timeLeft)
|
||||||
|
|
||||||
if timeLeft >= 60 then
|
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")
|
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
|
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")
|
self.cooldownFont:SetFont(Gladdy:SMFetch("font", "racialFont"), (self:GetWidth()/2 - 1) * Gladdy.db.racialFontScale, "OUTLINE")
|
||||||
elseif timeLeft < 30 and timeLeft >= 11 then
|
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")
|
self.cooldownFont:SetFont(Gladdy:SMFetch("font", "racialFont"), (self:GetWidth()/2 - 1) * Gladdy.db.racialFontScale, "OUTLINE")
|
||||||
elseif timeLeft < 10 and timeLeft >= 5 then
|
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")
|
self.cooldownFont:SetFont(Gladdy:SMFetch("font", "racialFont"), (self:GetWidth()/2 - 1) * Gladdy.db.racialFontScale, "OUTLINE")
|
||||||
elseif timeLeft < 5 and timeLeft > 0 then
|
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")
|
self.cooldownFont:SetFont(Gladdy:SMFetch("font", "racialFont"), (self:GetWidth()/2 - 1) * Gladdy.db.racialFontScale, "OUTLINE")
|
||||||
end
|
end
|
||||||
Gladdy:FormatTimer(self.cooldownFont, self.timeLeft, self.timeLeft < 10, true)
|
Gladdy:FormatTimer(self.cooldownFont, self.timeLeft, self.timeLeft < 10, true)
|
||||||
@ -270,6 +271,15 @@ function Racial:GetOptions()
|
|||||||
order = 8,
|
order = 8,
|
||||||
width = "full",
|
width = "full",
|
||||||
}),
|
}),
|
||||||
|
racialCooldownNumberAlpha = Gladdy:option({
|
||||||
|
type = "range",
|
||||||
|
name = L["Cooldown number alpha"],
|
||||||
|
min = 0,
|
||||||
|
max = 1,
|
||||||
|
step = 0.1,
|
||||||
|
order = 9,
|
||||||
|
width = "full",
|
||||||
|
}),
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
font = {
|
font = {
|
||||||
|
@ -17,6 +17,7 @@ local Trinket = Gladdy:NewModule("Trinket", nil, {
|
|||||||
trinketBorderColor = { r = 0, g = 0, b = 0, a = 1 },
|
trinketBorderColor = { r = 0, g = 0, b = 0, a = 1 },
|
||||||
trinketDisableCircle = false,
|
trinketDisableCircle = false,
|
||||||
trinketCooldownAlpha = 1,
|
trinketCooldownAlpha = 1,
|
||||||
|
trinketCooldownNumberAlpha = 1,
|
||||||
})
|
})
|
||||||
LibStub("AceComm-3.0"):Embed(Trinket)
|
LibStub("AceComm-3.0"):Embed(Trinket)
|
||||||
|
|
||||||
@ -39,19 +40,19 @@ local function iconTimer(self, elapsed)
|
|||||||
local timeLeft = ceil(self.timeLeft)
|
local timeLeft = ceil(self.timeLeft)
|
||||||
|
|
||||||
if timeLeft >= 60 then
|
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")
|
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
|
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")
|
self.cooldownFont:SetFont(Gladdy:SMFetch("font", "trinketFont"), (self:GetWidth()/2 - 1) * Gladdy.db.trinketFontScale, "OUTLINE")
|
||||||
elseif timeLeft < 30 and timeLeft >= 11 then
|
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")
|
self.cooldownFont:SetFont(Gladdy:SMFetch("font", "trinketFont"), (self:GetWidth()/2 - 1) * Gladdy.db.trinketFontScale, "OUTLINE")
|
||||||
elseif timeLeft <= 10 and timeLeft >= 5 then
|
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")
|
self.cooldownFont:SetFont(Gladdy:SMFetch("font", "trinketFont"), (self:GetWidth()/2 - 1) * Gladdy.db.trinketFontScale, "OUTLINE")
|
||||||
elseif timeLeft < 5 and timeLeft > 0 then
|
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")
|
self.cooldownFont:SetFont(Gladdy:SMFetch("font", "trinketFont"), (self:GetWidth()/2 - 1) * Gladdy.db.trinketFontScale, "OUTLINE")
|
||||||
end
|
end
|
||||||
Gladdy:FormatTimer(self.cooldownFont, self.timeLeft, self.timeLeft < 10, true)
|
Gladdy:FormatTimer(self.cooldownFont, self.timeLeft, self.timeLeft < 10, true)
|
||||||
@ -276,6 +277,15 @@ function Trinket:GetOptions()
|
|||||||
order = 8,
|
order = 8,
|
||||||
width = "full",
|
width = "full",
|
||||||
}),
|
}),
|
||||||
|
trinketCooldownNumberAlpha = Gladdy:option({
|
||||||
|
type = "range",
|
||||||
|
name = L["Cooldown number alpha"],
|
||||||
|
min = 0,
|
||||||
|
max = 1,
|
||||||
|
step = 0.1,
|
||||||
|
order = 9,
|
||||||
|
width = "full",
|
||||||
|
}),
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
font = {
|
font = {
|
||||||
|
Loading…
Reference in New Issue
Block a user