zoomed icons auras, buffs, castbar, classicon, cooldowns, diminishing, racial, trinket
This commit is contained in:
parent
aa66a9a10c
commit
b2b4848ff4
@ -47,11 +47,13 @@ local Auras = Gladdy:NewModule("Auras", nil, {
|
|||||||
auraYOffset = 0,
|
auraYOffset = 0,
|
||||||
auraSize = 60 + 20 + 1,
|
auraSize = 60 + 20 + 1,
|
||||||
auraWidthFactor = 0.9,
|
auraWidthFactor = 0.9,
|
||||||
|
auraIconZoomed = false,
|
||||||
auraInterruptDetached = false,
|
auraInterruptDetached = false,
|
||||||
auraInterruptXOffset = 0,
|
auraInterruptXOffset = 0,
|
||||||
auraInterruptYOffset = 0,
|
auraInterruptYOffset = 0,
|
||||||
auraInterruptSize = 60 + 20 + 1,
|
auraInterruptSize = 60 + 20 + 1,
|
||||||
auraInterruptWidthFactor = 0.9,
|
auraInterruptWidthFactor = 0.9,
|
||||||
|
auraInterruptIconZoomed = false,
|
||||||
auraFrameStrata = "MEDIUM",
|
auraFrameStrata = "MEDIUM",
|
||||||
auraFrameLevel = 5,
|
auraFrameLevel = 5,
|
||||||
auraInterruptFrameStrata = "MEDIUM",
|
auraInterruptFrameStrata = "MEDIUM",
|
||||||
@ -101,6 +103,7 @@ function Auras:CreateFrame(unit)
|
|||||||
auraFrame.icon = auraFrame.frame:CreateTexture(nil, "BACKGROUND")
|
auraFrame.icon = auraFrame.frame:CreateTexture(nil, "BACKGROUND")
|
||||||
auraFrame.icon:SetMask("Interface\\AddOns\\Gladdy\\Images\\mask")
|
auraFrame.icon:SetMask("Interface\\AddOns\\Gladdy\\Images\\mask")
|
||||||
auraFrame.icon:SetAllPoints(auraFrame)
|
auraFrame.icon:SetAllPoints(auraFrame)
|
||||||
|
auraFrame.icon.masked = true
|
||||||
|
|
||||||
auraFrame.icon.overlay = auraFrame.cooldownFrame:CreateTexture(nil, "OVERLAY")
|
auraFrame.icon.overlay = auraFrame.cooldownFrame:CreateTexture(nil, "OVERLAY")
|
||||||
auraFrame.icon.overlay:SetAllPoints(auraFrame)
|
auraFrame.icon.overlay:SetAllPoints(auraFrame)
|
||||||
@ -174,6 +177,7 @@ function Auras:CreateInterrupt(unit)
|
|||||||
interruptFrame.icon = interruptFrame.frame:CreateTexture(nil, "BACKGROUND")
|
interruptFrame.icon = interruptFrame.frame:CreateTexture(nil, "BACKGROUND")
|
||||||
interruptFrame.icon:SetMask("Interface\\AddOns\\Gladdy\\Images\\mask")
|
interruptFrame.icon:SetMask("Interface\\AddOns\\Gladdy\\Images\\mask")
|
||||||
interruptFrame.icon:SetAllPoints(interruptFrame.frame)
|
interruptFrame.icon:SetAllPoints(interruptFrame.frame)
|
||||||
|
interruptFrame.icon.masked = true
|
||||||
|
|
||||||
interruptFrame.icon.overlay = interruptFrame.cooldownFrame:CreateTexture(nil, "OVERLAY")
|
interruptFrame.icon.overlay = interruptFrame.cooldownFrame:CreateTexture(nil, "OVERLAY")
|
||||||
interruptFrame.icon.overlay:SetAllPoints(interruptFrame.frame)
|
interruptFrame.icon.overlay:SetAllPoints(interruptFrame.frame)
|
||||||
@ -287,6 +291,8 @@ function Auras:UpdateFrame(unit)
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
local testAgain = false
|
||||||
|
|
||||||
auraFrame:SetWidth(width)
|
auraFrame:SetWidth(width)
|
||||||
auraFrame:SetHeight(height)
|
auraFrame:SetHeight(height)
|
||||||
auraFrame.frame:SetWidth(height)
|
auraFrame.frame:SetWidth(height)
|
||||||
@ -296,8 +302,13 @@ function Auras:UpdateFrame(unit)
|
|||||||
|
|
||||||
auraFrame.cooldown:ClearAllPoints()
|
auraFrame.cooldown:ClearAllPoints()
|
||||||
auraFrame.cooldown:SetPoint("CENTER", auraFrame, "CENTER")
|
auraFrame.cooldown:SetPoint("CENTER", auraFrame, "CENTER")
|
||||||
auraFrame.cooldown:SetWidth(width - width/16)
|
if Gladdy.db.auraIconZoomed then
|
||||||
auraFrame.cooldown:SetHeight(height - height/16)
|
auraFrame.cooldown:SetWidth(width)
|
||||||
|
auraFrame.cooldown:SetHeight(height)
|
||||||
|
else
|
||||||
|
auraFrame.cooldown:SetWidth(width - width/16)
|
||||||
|
auraFrame.cooldown:SetHeight(height - height/16)
|
||||||
|
end
|
||||||
auraFrame.cooldown:SetAlpha(Gladdy.db.auraCooldownAlpha)
|
auraFrame.cooldown:SetAlpha(Gladdy.db.auraCooldownAlpha)
|
||||||
|
|
||||||
auraFrame.text:SetFont(Gladdy:SMFetch("font", "auraFont"), (width/2 - 1) * Gladdy.db.auraFontSizeScale, "OUTLINE")
|
auraFrame.text:SetFont(Gladdy:SMFetch("font", "auraFont"), (width/2 - 1) * Gladdy.db.auraFontSizeScale, "OUTLINE")
|
||||||
@ -317,7 +328,31 @@ function Auras:UpdateFrame(unit)
|
|||||||
if Gladdy.db.auraDisableCircle then
|
if Gladdy.db.auraDisableCircle then
|
||||||
auraFrame.cooldown:SetAlpha(0)
|
auraFrame.cooldown:SetAlpha(0)
|
||||||
end
|
end
|
||||||
self:UpdateInterruptFrame(unit)
|
|
||||||
|
if Gladdy.db.auraIconZoomed then
|
||||||
|
if auraFrame.icon.masked then
|
||||||
|
auraFrame.icon:SetMask(nil)
|
||||||
|
auraFrame.icon:SetTexCoord(0.1,0.9,0.1,0.9)
|
||||||
|
auraFrame.icon.masked = nil
|
||||||
|
end
|
||||||
|
else
|
||||||
|
if not auraFrame.icon.masked then
|
||||||
|
auraFrame.icon:SetMask(nil)
|
||||||
|
auraFrame.icon:SetTexCoord(0,1,0,1)
|
||||||
|
auraFrame.icon:SetMask("Interface\\AddOns\\Gladdy\\Images\\mask")
|
||||||
|
auraFrame.icon.masked = true
|
||||||
|
if Gladdy.frame.testing then
|
||||||
|
testAgain = true
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
testAgain = testAgain or self:UpdateInterruptFrame(unit)
|
||||||
|
|
||||||
|
if testAgain then
|
||||||
|
Auras:ResetUnit(unit)
|
||||||
|
Auras:Test(unit)
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
function Auras:UpdateInterruptFrame(unit)
|
function Auras:UpdateInterruptFrame(unit)
|
||||||
@ -405,6 +440,8 @@ function Auras:UpdateInterruptFrame(unit)
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
local testAgain = false
|
||||||
|
|
||||||
interruptFrame:SetWidth(width)
|
interruptFrame:SetWidth(width)
|
||||||
interruptFrame:SetHeight(height)
|
interruptFrame:SetHeight(height)
|
||||||
interruptFrame.frame:SetWidth(width)
|
interruptFrame.frame:SetWidth(width)
|
||||||
@ -414,8 +451,14 @@ function Auras:UpdateInterruptFrame(unit)
|
|||||||
|
|
||||||
interruptFrame.cooldown:ClearAllPoints()
|
interruptFrame.cooldown:ClearAllPoints()
|
||||||
interruptFrame.cooldown:SetPoint("CENTER", interruptFrame, "CENTER")
|
interruptFrame.cooldown:SetPoint("CENTER", interruptFrame, "CENTER")
|
||||||
interruptFrame.cooldown:SetWidth(width - width/16)
|
if Gladdy.db.auraInterruptIconZoomed then
|
||||||
interruptFrame.cooldown:SetHeight(height - height/16)
|
interruptFrame.cooldown:SetWidth(width)
|
||||||
|
interruptFrame.cooldown:SetHeight(height)
|
||||||
|
|
||||||
|
else
|
||||||
|
interruptFrame.cooldown:SetWidth(width - width/16)
|
||||||
|
interruptFrame.cooldown:SetHeight(height - height/16)
|
||||||
|
end
|
||||||
interruptFrame.cooldown:SetAlpha(Gladdy.db.auraCooldownAlpha)
|
interruptFrame.cooldown:SetAlpha(Gladdy.db.auraCooldownAlpha)
|
||||||
|
|
||||||
interruptFrame.text:SetFont(Gladdy:SMFetch("font", "auraFont"), (width/2 - 1) * Gladdy.db.auraFontSizeScale, "OUTLINE")
|
interruptFrame.text:SetFont(Gladdy:SMFetch("font", "auraFont"), (width/2 - 1) * Gladdy.db.auraFontSizeScale, "OUTLINE")
|
||||||
@ -433,6 +476,25 @@ function Auras:UpdateInterruptFrame(unit)
|
|||||||
if Gladdy.db.auraDisableCircle then
|
if Gladdy.db.auraDisableCircle then
|
||||||
interruptFrame.cooldown:SetAlpha(0)
|
interruptFrame.cooldown:SetAlpha(0)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
if Gladdy.db.auraInterruptIconZoomed then
|
||||||
|
if interruptFrame.icon.masked then
|
||||||
|
interruptFrame.icon:SetMask(nil)
|
||||||
|
interruptFrame.icon:SetTexCoord(0.1,0.9,0.1,0.9)
|
||||||
|
interruptFrame.icon.masked = nil
|
||||||
|
end
|
||||||
|
else
|
||||||
|
if not interruptFrame.icon.masked then
|
||||||
|
interruptFrame.icon:SetMask(nil)
|
||||||
|
interruptFrame.icon:SetTexCoord(0,1,0,1)
|
||||||
|
interruptFrame.icon:SetMask("Interface\\AddOns\\Gladdy\\Images\\mask")
|
||||||
|
interruptFrame.icon.masked = true
|
||||||
|
if Gladdy.frame.testing then
|
||||||
|
testAgain = true
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
return testAgain
|
||||||
end
|
end
|
||||||
|
|
||||||
function Auras:ResetUnit(unit)
|
function Auras:ResetUnit(unit)
|
||||||
@ -792,6 +854,21 @@ function Auras:GetOptions()
|
|||||||
order = 2,
|
order = 2,
|
||||||
width = "full"
|
width = "full"
|
||||||
}),
|
}),
|
||||||
|
headerIcon = {
|
||||||
|
type = "header",
|
||||||
|
name = L["Icon"],
|
||||||
|
order = 5,
|
||||||
|
},
|
||||||
|
auraIconZoomed = Gladdy:option({
|
||||||
|
type = "toggle",
|
||||||
|
name = L["Zoomed Icon"],
|
||||||
|
desc = L["Zoomes the icon to remove borders"],
|
||||||
|
disabled = function()
|
||||||
|
return not Gladdy.db.auraDetached
|
||||||
|
end,
|
||||||
|
order = 6,
|
||||||
|
width = "full",
|
||||||
|
}),
|
||||||
headerAuraSize = {
|
headerAuraSize = {
|
||||||
type = "header",
|
type = "header",
|
||||||
name = L["Size"],
|
name = L["Size"],
|
||||||
@ -896,6 +973,21 @@ function Auras:GetOptions()
|
|||||||
order = 2,
|
order = 2,
|
||||||
width = "full"
|
width = "full"
|
||||||
}),
|
}),
|
||||||
|
headerIcon = {
|
||||||
|
type = "header",
|
||||||
|
name = L["Icon"],
|
||||||
|
order = 5,
|
||||||
|
},
|
||||||
|
auraInterruptIconZoomed = Gladdy:option({
|
||||||
|
type = "toggle",
|
||||||
|
name = L["Zoomed Icon"],
|
||||||
|
desc = L["Zoomes the icon to remove borders"],
|
||||||
|
disabled = function()
|
||||||
|
return not Gladdy.db.auraInterruptDetached
|
||||||
|
end,
|
||||||
|
order = 6,
|
||||||
|
width = "full",
|
||||||
|
}),
|
||||||
headerAuraSize = {
|
headerAuraSize = {
|
||||||
type = "header",
|
type = "header",
|
||||||
name = L["Size"],
|
name = L["Size"],
|
||||||
@ -984,10 +1076,29 @@ function Auras:GetOptions()
|
|||||||
}),
|
}),
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
icon = {
|
||||||
|
type = "group",
|
||||||
|
name = L["Icon"],
|
||||||
|
order = 1,
|
||||||
|
args = {
|
||||||
|
headerIcon = {
|
||||||
|
type = "header",
|
||||||
|
name = L["Icon"],
|
||||||
|
order = 1,
|
||||||
|
},
|
||||||
|
auraIconZoomed = Gladdy:option({
|
||||||
|
type = "toggle",
|
||||||
|
name = L["Zoomed Icon"],
|
||||||
|
desc = L["Zoomes the icon to remove borders"],
|
||||||
|
order = 2,
|
||||||
|
width = "full",
|
||||||
|
}),
|
||||||
|
},
|
||||||
|
},
|
||||||
cooldown = {
|
cooldown = {
|
||||||
type = "group",
|
type = "group",
|
||||||
name = L["Cooldown"],
|
name = L["Cooldown"],
|
||||||
order = 1,
|
order = 2,
|
||||||
args = {
|
args = {
|
||||||
headerAuras = {
|
headerAuras = {
|
||||||
type = "header",
|
type = "header",
|
||||||
@ -1030,7 +1141,7 @@ function Auras:GetOptions()
|
|||||||
font = {
|
font = {
|
||||||
type = "group",
|
type = "group",
|
||||||
name = L["Font"],
|
name = L["Font"],
|
||||||
order = 2,
|
order = 3,
|
||||||
args = {
|
args = {
|
||||||
headerAuras = {
|
headerAuras = {
|
||||||
type = "header",
|
type = "header",
|
||||||
@ -1067,7 +1178,7 @@ function Auras:GetOptions()
|
|||||||
border = {
|
border = {
|
||||||
type = "group",
|
type = "group",
|
||||||
name = L["Border"],
|
name = L["Border"],
|
||||||
order = 3,
|
order = 4,
|
||||||
args = borderArgs
|
args = borderArgs
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -20,10 +20,12 @@ local BuffsDebuffs = Gladdy:NewModule("Buffs and Debuffs", nil, {
|
|||||||
buffsAlpha = 1,
|
buffsAlpha = 1,
|
||||||
buffsIconSize = 30,
|
buffsIconSize = 30,
|
||||||
buffsWidthFactor = 1,
|
buffsWidthFactor = 1,
|
||||||
|
buffsIconZoomed = false,
|
||||||
buffsIconPadding = 1,
|
buffsIconPadding = 1,
|
||||||
buffsBuffsAlpha = 1,
|
buffsBuffsAlpha = 1,
|
||||||
buffsBuffsIconSize = 30,
|
buffsBuffsIconSize = 30,
|
||||||
buffsBuffsWidthFactor = 1,
|
buffsBuffsWidthFactor = 1,
|
||||||
|
buffsBuffsIconZoomed = false,
|
||||||
buffsBuffsIconPadding = 1,
|
buffsBuffsIconPadding = 1,
|
||||||
buffsDisableCircle = false,
|
buffsDisableCircle = false,
|
||||||
buffsCooldownAlpha = 1,
|
buffsCooldownAlpha = 1,
|
||||||
@ -289,6 +291,31 @@ local function styleIcon(aura, auraType)
|
|||||||
aura.cooldowncircle:SetAlpha(Gladdy.db.buffsCooldownAlpha)
|
aura.cooldowncircle:SetAlpha(Gladdy.db.buffsCooldownAlpha)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
local zoomedOption, testAgain
|
||||||
|
if auraType == AURA_TYPE_BUFF then
|
||||||
|
zoomedOption = Gladdy.db.buffsBuffsIconZoomed
|
||||||
|
else
|
||||||
|
zoomedOption = Gladdy.db.buffsIconZoomed
|
||||||
|
end
|
||||||
|
|
||||||
|
if zoomedOption then
|
||||||
|
if aura.texture.masked then
|
||||||
|
aura.texture:SetMask(nil)
|
||||||
|
aura.texture:SetTexCoord(0.1,0.9,0.1,0.9)
|
||||||
|
aura.texture.masked = nil
|
||||||
|
end
|
||||||
|
else
|
||||||
|
if not aura.texture.masked then
|
||||||
|
aura.texture:SetMask(nil)
|
||||||
|
aura.texture:SetTexCoord(0,1,0,1)
|
||||||
|
aura.texture:SetMask("Interface\\AddOns\\Gladdy\\Images\\mask")
|
||||||
|
aura.texture.masked = true
|
||||||
|
if Gladdy.frame.testing then
|
||||||
|
testAgain = true
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
aura:SetFrameStrata(Gladdy.db.buffFrameStrata)
|
aura:SetFrameStrata(Gladdy.db.buffFrameStrata)
|
||||||
aura:SetFrameLevel(Gladdy.db.buffsFrameLevel)
|
aura:SetFrameLevel(Gladdy.db.buffsFrameLevel)
|
||||||
aura.cooldowncircle:SetFrameLevel(Gladdy.db.buffsFrameLevel + 1)
|
aura.cooldowncircle:SetFrameLevel(Gladdy.db.buffsFrameLevel + 1)
|
||||||
@ -300,6 +327,8 @@ local function styleIcon(aura, auraType)
|
|||||||
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, 1)
|
aura.stacks:SetTextColor(Gladdy.db.buffsFontColor.r, Gladdy.db.buffsFontColor.g, Gladdy.db.buffsFontColor.b, 1)
|
||||||
|
|
||||||
|
return testAgain
|
||||||
end
|
end
|
||||||
|
|
||||||
function BuffsDebuffs:UpdateFrameOnce()
|
function BuffsDebuffs:UpdateFrameOnce()
|
||||||
@ -339,16 +368,23 @@ function BuffsDebuffs:UpdateFrame(unit)
|
|||||||
0, 0, "buffsEnabled")
|
0, 0, "buffsEnabled")
|
||||||
end
|
end
|
||||||
|
|
||||||
|
local testBuffsAgain, testDebuffsAgain
|
||||||
|
|
||||||
for i=1, #self.frames[unit].auras[AURA_TYPE_BUFF] do
|
for i=1, #self.frames[unit].auras[AURA_TYPE_BUFF] do
|
||||||
styleIcon(self.frames[unit].auras[AURA_TYPE_BUFF][i], AURA_TYPE_BUFF)
|
testBuffsAgain = styleIcon(self.frames[unit].auras[AURA_TYPE_BUFF][i], AURA_TYPE_BUFF)
|
||||||
end
|
end
|
||||||
for i=1, #self.frames[unit].auras[AURA_TYPE_DEBUFF] do
|
for i=1, #self.frames[unit].auras[AURA_TYPE_DEBUFF] do
|
||||||
styleIcon(self.frames[unit].auras[AURA_TYPE_DEBUFF][i], AURA_TYPE_DEBUFF)
|
testDebuffsAgain = styleIcon(self.frames[unit].auras[AURA_TYPE_DEBUFF][i], AURA_TYPE_DEBUFF)
|
||||||
end
|
end
|
||||||
for i=1, #self.framePool do
|
for i=1, #self.framePool do
|
||||||
styleIcon(self.framePool[i])
|
styleIcon(self.framePool[i])
|
||||||
end
|
end
|
||||||
self:UpdateAurasOnUnit(unit)
|
self:UpdateAurasOnUnit(unit)
|
||||||
|
|
||||||
|
if Gladdy.frame.testing and (testBuffsAgain or testDebuffsAgain) then
|
||||||
|
self:ResetUnit(unit)
|
||||||
|
self:Test(unit)
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
---------------------------
|
---------------------------
|
||||||
@ -418,6 +454,7 @@ function BuffsDebuffs:AddAura(unit, spellID, auraType, duration, timeLeft, stack
|
|||||||
if not self.frames[unit].auras[auraType][index] then
|
if not self.frames[unit].auras[auraType][index] then
|
||||||
if #self.framePool > 0 then
|
if #self.framePool > 0 then
|
||||||
aura = tremove(self.framePool, #self.framePool)
|
aura = tremove(self.framePool, #self.framePool)
|
||||||
|
styleIcon(aura)
|
||||||
else
|
else
|
||||||
aura = CreateFrame("Frame")
|
aura = CreateFrame("Frame")
|
||||||
aura:EnableMouse(false)
|
aura:EnableMouse(false)
|
||||||
@ -425,6 +462,7 @@ function BuffsDebuffs:AddAura(unit, spellID, auraType, duration, timeLeft, stack
|
|||||||
aura:SetFrameLevel(Gladdy.db.buffsFrameLevel)
|
aura:SetFrameLevel(Gladdy.db.buffsFrameLevel)
|
||||||
aura.texture = aura:CreateTexture(nil, "BACKGROUND")
|
aura.texture = aura:CreateTexture(nil, "BACKGROUND")
|
||||||
aura.texture:SetMask("Interface\\AddOns\\Gladdy\\Images\\mask")
|
aura.texture:SetMask("Interface\\AddOns\\Gladdy\\Images\\mask")
|
||||||
|
aura.texture.masked = true
|
||||||
aura.texture:SetAllPoints(aura)
|
aura.texture:SetAllPoints(aura)
|
||||||
aura.cooldowncircle = CreateFrame("Cooldown", nil, aura, "CooldownFrameTemplate")
|
aura.cooldowncircle = CreateFrame("Cooldown", nil, aura, "CooldownFrameTemplate")
|
||||||
aura.cooldowncircle:SetFrameLevel(Gladdy.db.buffsFrameLevel + 1)
|
aura.cooldowncircle:SetFrameLevel(Gladdy.db.buffsFrameLevel + 1)
|
||||||
@ -529,14 +567,21 @@ function BuffsDebuffs:GetOptions()
|
|||||||
args = {
|
args = {
|
||||||
size = {
|
size = {
|
||||||
type = "group",
|
type = "group",
|
||||||
name = L["Size & Padding"],
|
name = L["Icon"],
|
||||||
order = 1,
|
order = 1,
|
||||||
args = {
|
args = {
|
||||||
header = {
|
header = {
|
||||||
type = "header",
|
type = "header",
|
||||||
name = L["Size & Padding"],
|
name = L["Icon"],
|
||||||
order = 5,
|
order = 1,
|
||||||
},
|
},
|
||||||
|
buffsBuffsIconZoomed = Gladdy:option({
|
||||||
|
type = "toggle",
|
||||||
|
name = L["Zoomed Icon"],
|
||||||
|
desc = L["Zoomes the icon to remove borders"],
|
||||||
|
order = 2,
|
||||||
|
width = "full",
|
||||||
|
}),
|
||||||
buffsBuffsIconSize = Gladdy:option({
|
buffsBuffsIconSize = Gladdy:option({
|
||||||
type = "range",
|
type = "range",
|
||||||
name = L["Icon Size"],
|
name = L["Icon Size"],
|
||||||
@ -639,14 +684,21 @@ function BuffsDebuffs:GetOptions()
|
|||||||
args = {
|
args = {
|
||||||
size = {
|
size = {
|
||||||
type = "group",
|
type = "group",
|
||||||
name = L["Size & Padding"],
|
name = L["Icon"],
|
||||||
order = 1,
|
order = 1,
|
||||||
args = {
|
args = {
|
||||||
header = {
|
header = {
|
||||||
type = "header",
|
type = "header",
|
||||||
name = L["Size & Padding"],
|
name = L["Icon"],
|
||||||
order = 5,
|
order = 1,
|
||||||
},
|
},
|
||||||
|
buffsIconZoomed = Gladdy:option({
|
||||||
|
type = "toggle",
|
||||||
|
name = L["Zoomed Icon"],
|
||||||
|
desc = L["Zoomes the icon to remove borders"],
|
||||||
|
order = 2,
|
||||||
|
width = "full",
|
||||||
|
}),
|
||||||
buffsIconSize = Gladdy:option({
|
buffsIconSize = Gladdy:option({
|
||||||
type = "range",
|
type = "range",
|
||||||
name = L["Icon Size"],
|
name = L["Icon Size"],
|
||||||
|
@ -23,6 +23,7 @@ local Castbar = Gladdy:NewModule("Cast Bar", 70, {
|
|||||||
castBarHeight = 20,
|
castBarHeight = 20,
|
||||||
castBarWidth = 160,
|
castBarWidth = 160,
|
||||||
castBarIconSize = 22,
|
castBarIconSize = 22,
|
||||||
|
castBarIconZoomed = false,
|
||||||
castBarBorderSize = 8,
|
castBarBorderSize = 8,
|
||||||
castBarFontSize = 12,
|
castBarFontSize = 12,
|
||||||
castBarFontOutline = false,
|
castBarFontOutline = false,
|
||||||
@ -104,6 +105,7 @@ function Castbar:CreateFrame(unit)
|
|||||||
castBar.icon.texture = castBar.icon:CreateTexture(nil, "BACKGROUND")
|
castBar.icon.texture = castBar.icon:CreateTexture(nil, "BACKGROUND")
|
||||||
castBar.icon.texture:SetMask("Interface\\AddOns\\Gladdy\\Images\\mask")
|
castBar.icon.texture:SetMask("Interface\\AddOns\\Gladdy\\Images\\mask")
|
||||||
castBar.icon.texture:SetAllPoints(castBar.icon)
|
castBar.icon.texture:SetAllPoints(castBar.icon)
|
||||||
|
castBar.icon.texture.masked = true
|
||||||
castBar.icon.texture.overlay = castBar.icon:CreateTexture(nil, "BORDER")
|
castBar.icon.texture.overlay = castBar.icon:CreateTexture(nil, "BORDER")
|
||||||
castBar.icon.texture.overlay:SetAllPoints(castBar.icon.texture)
|
castBar.icon.texture.overlay:SetAllPoints(castBar.icon.texture)
|
||||||
castBar.icon.texture.overlay:SetTexture(Gladdy.db.castBarIconStyle)
|
castBar.icon.texture.overlay:SetTexture(Gladdy.db.castBarIconStyle)
|
||||||
@ -157,6 +159,8 @@ function Castbar:UpdateFrame(unit)
|
|||||||
return
|
return
|
||||||
end
|
end
|
||||||
|
|
||||||
|
local testAgain = false
|
||||||
|
|
||||||
castBar:SetFrameStrata(Gladdy.db.castBarFrameStrata)
|
castBar:SetFrameStrata(Gladdy.db.castBarFrameStrata)
|
||||||
castBar:SetFrameLevel(Gladdy.db.castBarFrameLevel)
|
castBar:SetFrameLevel(Gladdy.db.castBarFrameLevel)
|
||||||
castBar.backdrop:SetFrameStrata(Gladdy.db.castBarFrameStrata)
|
castBar.backdrop:SetFrameStrata(Gladdy.db.castBarFrameStrata)
|
||||||
@ -191,12 +195,24 @@ function Castbar:UpdateFrame(unit)
|
|||||||
castBar.icon:SetWidth(Gladdy.db.castBarIconSize)
|
castBar.icon:SetWidth(Gladdy.db.castBarIconSize)
|
||||||
castBar.icon:SetHeight(Gladdy.db.castBarIconSize)
|
castBar.icon:SetHeight(Gladdy.db.castBarIconSize)
|
||||||
castBar.icon.texture:SetAllPoints(castBar.icon)
|
castBar.icon.texture:SetAllPoints(castBar.icon)
|
||||||
castBar.icon:ClearAllPoints()
|
if Gladdy.db.castBarIconZoomed then
|
||||||
if Gladdy.db.castBarIconEnabled then
|
if castBar.icon.texture.masked then
|
||||||
castBar.icon:Show()
|
castBar.icon.texture:SetMask(nil)
|
||||||
|
castBar.icon.texture:SetTexCoord(0.1,0.9,0.1,0.9)
|
||||||
|
castBar.icon.texture.masked = nil
|
||||||
|
end
|
||||||
else
|
else
|
||||||
castBar.icon:Hide()
|
if not castBar.icon.texture.masked then
|
||||||
|
castBar.icon.texture:SetMask(nil)
|
||||||
|
castBar.icon.texture:SetTexCoord(0,1,0,1)
|
||||||
|
castBar.icon.texture:SetMask("Interface\\AddOns\\Gladdy\\Images\\mask")
|
||||||
|
castBar.icon.texture.masked = true
|
||||||
|
if Gladdy.frame.testing then
|
||||||
|
testAgain = true
|
||||||
|
end
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
castBar.icon:ClearAllPoints()
|
||||||
|
|
||||||
castBar.shield:SetWidth(Gladdy.db.castBarIconSize * 3.2)
|
castBar.shield:SetWidth(Gladdy.db.castBarIconSize * 3.2)
|
||||||
castBar.shield:SetHeight(Gladdy.db.castBarIconSize * 3.2)
|
castBar.shield:SetHeight(Gladdy.db.castBarIconSize * 3.2)
|
||||||
@ -230,6 +246,16 @@ function Castbar:UpdateFrame(unit)
|
|||||||
if not Gladdy.db.castBarEnabled then
|
if not Gladdy.db.castBarEnabled then
|
||||||
self:CAST_STOP(unit)
|
self:CAST_STOP(unit)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
if Gladdy.db.castBarIconEnabled then
|
||||||
|
castBar.icon:Show()
|
||||||
|
if testAgain then
|
||||||
|
self:ResetUnit(unit)
|
||||||
|
self:Test(unit)
|
||||||
|
end
|
||||||
|
else
|
||||||
|
castBar.icon:Hide()
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
---------------------------
|
---------------------------
|
||||||
@ -712,7 +738,7 @@ function Castbar:GetOptions()
|
|||||||
args = {
|
args = {
|
||||||
headerSize = {
|
headerSize = {
|
||||||
type = "header",
|
type = "header",
|
||||||
name = L["Icon Size"],
|
name = L["Icon"],
|
||||||
order = 1,
|
order = 1,
|
||||||
},
|
},
|
||||||
castBarIconEnabled = option({
|
castBarIconEnabled = option({
|
||||||
@ -721,6 +747,13 @@ function Castbar:GetOptions()
|
|||||||
order = 2,
|
order = 2,
|
||||||
width = "full",
|
width = "full",
|
||||||
}),
|
}),
|
||||||
|
castBarIconZoomed = Gladdy:option({
|
||||||
|
type = "toggle",
|
||||||
|
name = L["Zoomed Icon"],
|
||||||
|
desc = L["Zoomes the icon to remove borders"],
|
||||||
|
order = 3,
|
||||||
|
width = "full",
|
||||||
|
}),
|
||||||
castBarIconSize = option({
|
castBarIconSize = option({
|
||||||
type = "range",
|
type = "range",
|
||||||
name = L["Icon size"],
|
name = L["Icon size"],
|
||||||
|
@ -8,6 +8,7 @@ local Classicon = Gladdy:NewModule("Class Icon", 81, {
|
|||||||
classIconEnabled = true,
|
classIconEnabled = true,
|
||||||
classIconSize = 60 + 20 + 1,
|
classIconSize = 60 + 20 + 1,
|
||||||
classIconWidthFactor = 0.9,
|
classIconWidthFactor = 0.9,
|
||||||
|
classIconZoomed = false,
|
||||||
classIconBorderStyle = "Interface\\AddOns\\Gladdy\\Images\\Border_rounded_blp",
|
classIconBorderStyle = "Interface\\AddOns\\Gladdy\\Images\\Border_rounded_blp",
|
||||||
classIconBorderColor = { r = 0, g = 0, b = 0, a = 1 },
|
classIconBorderColor = { r = 0, g = 0, b = 0, a = 1 },
|
||||||
classIconSpecIcon = false,
|
classIconSpecIcon = false,
|
||||||
@ -115,6 +116,7 @@ function Classicon:CreateFrame(unit)
|
|||||||
classIcon.texture = classIcon:CreateTexture(nil, "BACKGROUND")
|
classIcon.texture = classIcon:CreateTexture(nil, "BACKGROUND")
|
||||||
classIcon.texture:SetAllPoints(classIcon)
|
classIcon.texture:SetAllPoints(classIcon)
|
||||||
classIcon.texture:SetMask("Interface\\AddOns\\Gladdy\\Images\\mask")
|
classIcon.texture:SetMask("Interface\\AddOns\\Gladdy\\Images\\mask")
|
||||||
|
classIcon.texture.masked = true
|
||||||
|
|
||||||
classIcon.texture.overlay = classIcon:CreateTexture(nil, "BORDER")
|
classIcon.texture.overlay = classIcon:CreateTexture(nil, "BORDER")
|
||||||
classIcon.texture.overlay:SetAllPoints(classIcon)
|
classIcon.texture.overlay:SetAllPoints(classIcon)
|
||||||
@ -133,12 +135,32 @@ function Classicon:UpdateFrame(unit)
|
|||||||
return
|
return
|
||||||
end
|
end
|
||||||
|
|
||||||
|
local testAgain = false
|
||||||
|
|
||||||
classIcon:SetFrameStrata(Gladdy.db.classIconFrameStrata)
|
classIcon:SetFrameStrata(Gladdy.db.classIconFrameStrata)
|
||||||
classIcon:SetFrameLevel(Gladdy.db.classIconFrameLevel)
|
classIcon:SetFrameLevel(Gladdy.db.classIconFrameLevel)
|
||||||
|
|
||||||
classIcon:SetWidth(Gladdy.db.classIconSize * Gladdy.db.classIconWidthFactor)
|
classIcon:SetWidth(Gladdy.db.classIconSize * Gladdy.db.classIconWidthFactor)
|
||||||
classIcon:SetHeight(Gladdy.db.classIconSize)
|
classIcon:SetHeight(Gladdy.db.classIconSize)
|
||||||
|
|
||||||
|
if Gladdy.db.classIconZoomed then
|
||||||
|
if classIcon.texture.masked then
|
||||||
|
classIcon.texture:SetMask(nil)
|
||||||
|
classIcon.texture:SetTexCoord(0.1,0.9,0.1,0.9)
|
||||||
|
classIcon.texture.masked = nil
|
||||||
|
end
|
||||||
|
else
|
||||||
|
if not classIcon.texture.masked then
|
||||||
|
classIcon.texture:SetMask(nil)
|
||||||
|
classIcon.texture:SetTexCoord(0,1,0,1)
|
||||||
|
classIcon.texture:SetMask("Interface\\AddOns\\Gladdy\\Images\\mask")
|
||||||
|
classIcon.texture.masked = true
|
||||||
|
if Gladdy.frame.testing then
|
||||||
|
testAgain = true
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
Gladdy:SetPosition(classIcon, unit, "classIconXOffset", "classIconYOffset", Classicon:LegacySetPosition(classIcon, unit), Classicon)
|
Gladdy:SetPosition(classIcon, unit, "classIconXOffset", "classIconYOffset", Classicon:LegacySetPosition(classIcon, unit), Classicon)
|
||||||
|
|
||||||
if (Gladdy.db.classIconGroup) then
|
if (Gladdy.db.classIconGroup) then
|
||||||
@ -173,6 +195,10 @@ function Classicon:UpdateFrame(unit)
|
|||||||
classIcon.texture.overlay:SetVertexColor(Gladdy:SetColor(Gladdy.db.classIconBorderColor))
|
classIcon.texture.overlay:SetVertexColor(Gladdy:SetColor(Gladdy.db.classIconBorderColor))
|
||||||
if Gladdy.db.classIconEnabled then
|
if Gladdy.db.classIconEnabled then
|
||||||
classIcon:Show()
|
classIcon:Show()
|
||||||
|
if testAgain then
|
||||||
|
Classicon:ResetUnit(unit)
|
||||||
|
Classicon:ENEMY_SPOTTED(unit)
|
||||||
|
end
|
||||||
else
|
else
|
||||||
classIcon:Hide()
|
classIcon:Hide()
|
||||||
end
|
end
|
||||||
@ -267,17 +293,24 @@ function Classicon:GetOptions()
|
|||||||
args = {
|
args = {
|
||||||
size = {
|
size = {
|
||||||
type = "group",
|
type = "group",
|
||||||
name = L["Icon size"],
|
name = L["Icon"],
|
||||||
order = 1,
|
order = 1,
|
||||||
args = {
|
args = {
|
||||||
header = {
|
header = {
|
||||||
type = "header",
|
type = "header",
|
||||||
name = L["Icon size"],
|
name = L["Icon"],
|
||||||
order = 1,
|
order = 1,
|
||||||
},
|
},
|
||||||
|
classIconZoomed = Gladdy:option({
|
||||||
|
type = "toggle",
|
||||||
|
name = L["Zoomed Icon"],
|
||||||
|
desc = L["Zoomes the icon to remove borders"],
|
||||||
|
order = 2,
|
||||||
|
width = "full",
|
||||||
|
}),
|
||||||
classIconSize = Gladdy:option({
|
classIconSize = Gladdy:option({
|
||||||
type = "range",
|
type = "range",
|
||||||
name = L["Icon size"],
|
name = L["Size"],
|
||||||
min = 3,
|
min = 3,
|
||||||
max = 100,
|
max = 100,
|
||||||
step = .1,
|
step = .1,
|
||||||
|
@ -58,6 +58,10 @@ local Cooldowns = Gladdy:NewModule("Cooldowns", nil, {
|
|||||||
cooldownYOffset = 0,
|
cooldownYOffset = 0,
|
||||||
cooldownXOffset = 0,
|
cooldownXOffset = 0,
|
||||||
cooldownSize = 30,
|
cooldownSize = 30,
|
||||||
|
cooldownIconGlow = true,
|
||||||
|
cooldownIconZoomed = false,
|
||||||
|
cooldownIconDesaturateOnCooldown = false,
|
||||||
|
cooldownIconAlphaOnCooldown = 1,
|
||||||
cooldownWidthFactor = 1,
|
cooldownWidthFactor = 1,
|
||||||
cooldownIconPadding = 1,
|
cooldownIconPadding = 1,
|
||||||
cooldownMaxIconsPerLine = 10,
|
cooldownMaxIconsPerLine = 10,
|
||||||
@ -126,6 +130,7 @@ function Cooldowns:CreateIcon() -- returns iconFrame
|
|||||||
|
|
||||||
icon.texture = icon:CreateTexture(nil, "BACKGROUND")
|
icon.texture = icon:CreateTexture(nil, "BACKGROUND")
|
||||||
icon.texture:SetMask("Interface\\AddOns\\Gladdy\\Images\\mask")
|
icon.texture:SetMask("Interface\\AddOns\\Gladdy\\Images\\mask")
|
||||||
|
icon.texture.masked = true
|
||||||
icon.texture:SetAllPoints(icon)
|
icon.texture:SetAllPoints(icon)
|
||||||
|
|
||||||
icon.cooldown = CreateFrame("Cooldown", nil, icon, "CooldownFrameTemplate")
|
icon.cooldown = CreateFrame("Cooldown", nil, icon, "CooldownFrameTemplate")
|
||||||
@ -161,8 +166,13 @@ function Cooldowns:UpdateIcon(icon)
|
|||||||
icon.cooldownFont:SetFont(Gladdy:SMFetch("font", "cooldownFont"), Gladdy.db.cooldownSize / 2 * Gladdy.db.cooldownFontScale, "OUTLINE")
|
icon.cooldownFont:SetFont(Gladdy:SMFetch("font", "cooldownFont"), Gladdy.db.cooldownSize / 2 * Gladdy.db.cooldownFontScale, "OUTLINE")
|
||||||
icon.cooldownFont:SetTextColor(Gladdy:SetColor(Gladdy.db.cooldownFontColor))
|
icon.cooldownFont:SetTextColor(Gladdy:SetColor(Gladdy.db.cooldownFontColor))
|
||||||
|
|
||||||
icon.cooldown:SetWidth(icon:GetWidth() - icon:GetWidth()/16)
|
if Gladdy.db.cooldownIconZoomed then
|
||||||
icon.cooldown:SetHeight(icon:GetHeight() - icon:GetHeight()/16)
|
icon.cooldown:SetWidth(icon:GetWidth())
|
||||||
|
icon.cooldown:SetHeight(icon:GetHeight())
|
||||||
|
else
|
||||||
|
icon.cooldown:SetWidth(icon:GetWidth() - icon:GetWidth()/16)
|
||||||
|
icon.cooldown:SetHeight(icon:GetHeight() - icon:GetHeight()/16)
|
||||||
|
end
|
||||||
icon.cooldown:ClearAllPoints()
|
icon.cooldown:ClearAllPoints()
|
||||||
icon.cooldown:SetPoint("CENTER", icon, "CENTER")
|
icon.cooldown:SetPoint("CENTER", icon, "CENTER")
|
||||||
icon.cooldown:SetAlpha(Gladdy.db.cooldownCooldownAlpha)
|
icon.cooldown:SetAlpha(Gladdy.db.cooldownCooldownAlpha)
|
||||||
@ -172,6 +182,31 @@ function Cooldowns:UpdateIcon(icon)
|
|||||||
|
|
||||||
icon.border:SetTexture(Gladdy.db.cooldownBorderStyle)
|
icon.border:SetTexture(Gladdy.db.cooldownBorderStyle)
|
||||||
icon.border:SetVertexColor(Gladdy:SetColor(Gladdy.db.cooldownBorderColor))
|
icon.border:SetVertexColor(Gladdy:SetColor(Gladdy.db.cooldownBorderColor))
|
||||||
|
|
||||||
|
if Gladdy.db.cooldownIconZoomed then
|
||||||
|
if icon.texture.masked then
|
||||||
|
icon.texture:SetMask(nil)
|
||||||
|
icon.texture:SetTexCoord(0.1,0.9,0.1,0.9)
|
||||||
|
icon.texture.masked = nil
|
||||||
|
end
|
||||||
|
else
|
||||||
|
if not icon.texture.masked then
|
||||||
|
icon.texture:SetMask(nil)
|
||||||
|
icon.texture:SetTexCoord(0,1,0,1)
|
||||||
|
icon.texture:SetMask("Interface\\AddOns\\Gladdy\\Images\\mask")
|
||||||
|
icon.texture.masked = true
|
||||||
|
end
|
||||||
|
end
|
||||||
|
if Gladdy.db.cooldownIconDesaturateOnCooldown and icon.active then
|
||||||
|
icon.texture:SetDesaturated(true)
|
||||||
|
else
|
||||||
|
icon.texture:SetDesaturated(false)
|
||||||
|
end
|
||||||
|
if Gladdy.db.cooldownIconAlphaOnCooldown < 1 and icon.active then
|
||||||
|
icon.texture:SetAlpha(Gladdy.db.cooldownIconAlphaOnCooldown)
|
||||||
|
else
|
||||||
|
icon.texture:SetAlpha(1)
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
function Cooldowns:IconsSetPoint(button)
|
function Cooldowns:IconsSetPoint(button)
|
||||||
@ -224,6 +259,7 @@ end
|
|||||||
function Cooldowns:UpdateFrame(unit)
|
function Cooldowns:UpdateFrame(unit)
|
||||||
local button = Gladdy.buttons[unit]
|
local button = Gladdy.buttons[unit]
|
||||||
-- Cooldown frame
|
-- Cooldown frame
|
||||||
|
local testAgain = false
|
||||||
if (Gladdy.db.cooldown) then
|
if (Gladdy.db.cooldown) then
|
||||||
button.spellCooldownFrame:SetHeight(Gladdy.db.cooldownSize)
|
button.spellCooldownFrame:SetHeight(Gladdy.db.cooldownSize)
|
||||||
button.spellCooldownFrame:SetWidth(1)
|
button.spellCooldownFrame:SetWidth(1)
|
||||||
@ -249,13 +285,25 @@ function Cooldowns:UpdateFrame(unit)
|
|||||||
|
|
||||||
-- Update each cooldown icon
|
-- Update each cooldown icon
|
||||||
for _,icon in pairs(button.spellCooldownFrame.icons) do
|
for _,icon in pairs(button.spellCooldownFrame.icons) do
|
||||||
|
testAgain = icon.texture.masked
|
||||||
self:UpdateIcon(icon)
|
self:UpdateIcon(icon)
|
||||||
|
if icon.texture.masked ~= testAgain then
|
||||||
|
testAgain = true
|
||||||
|
else
|
||||||
|
testAgain = false
|
||||||
|
end
|
||||||
end
|
end
|
||||||
self:IconsSetPoint(button)
|
self:IconsSetPoint(button)
|
||||||
button.spellCooldownFrame:Show()
|
button.spellCooldownFrame:Show()
|
||||||
else
|
else
|
||||||
button.spellCooldownFrame:Hide()
|
button.spellCooldownFrame:Hide()
|
||||||
end
|
end
|
||||||
|
if testAgain and Gladdy.frame.testing then
|
||||||
|
Cooldowns:ResetUnit(unit)
|
||||||
|
Cooldowns:ENEMY_SPOTTED(unit)
|
||||||
|
Cooldowns:UNIT_SPEC(unit)
|
||||||
|
Cooldowns:Test(unit)
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
function Cooldowns:ResetUnit(unit)
|
function Cooldowns:ResetUnit(unit)
|
||||||
@ -398,6 +446,13 @@ function Cooldowns:CooldownStart(button, spellId, duration, start)
|
|||||||
icon.active = true
|
icon.active = true
|
||||||
icon.timeLeft = start and start - GetTime() + duration or duration
|
icon.timeLeft = start and start - GetTime() + duration or duration
|
||||||
if (not Gladdy.db.cooldownDisableCircle) then icon.cooldown:SetCooldown(start or GetTime(), duration) end
|
if (not Gladdy.db.cooldownDisableCircle) then icon.cooldown:SetCooldown(start or GetTime(), duration) end
|
||||||
|
if Gladdy.db.cooldownIconDesaturateOnCooldown then
|
||||||
|
icon.texture:SetDesaturated(true)
|
||||||
|
end
|
||||||
|
if Gladdy.db.cooldownIconAlphaOnCooldown < 1 then
|
||||||
|
icon.texture:SetAlpha(Gladdy.db.cooldownIconAlphaOnCooldown)
|
||||||
|
end
|
||||||
|
--if math.random(1, 30 ) > 10 then LCG.ButtonGlow_Start(icon, nil, 0.15) end
|
||||||
icon:SetScript("OnUpdate", function(self, elapsed)
|
icon:SetScript("OnUpdate", function(self, elapsed)
|
||||||
self.timeLeft = self.timeLeft - elapsed
|
self.timeLeft = self.timeLeft - elapsed
|
||||||
local timeLeft = ceil(self.timeLeft)
|
local timeLeft = ceil(self.timeLeft)
|
||||||
@ -421,21 +476,29 @@ function Cooldowns:CooldownStart(button, spellId, duration, start)
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
local function resetIcon(icon)
|
||||||
|
if Gladdy.db.cooldownIconDesaturateOnCooldown then
|
||||||
|
icon.texture:SetDesaturated(false)
|
||||||
|
end
|
||||||
|
if Gladdy.db.cooldownIconAlphaOnCooldown < 1 then
|
||||||
|
icon.texture:SetAlpha(1)
|
||||||
|
end
|
||||||
|
icon.active = false
|
||||||
|
icon.cooldown:Hide()
|
||||||
|
icon.cooldownFont:SetText("")
|
||||||
|
icon:SetScript("OnUpdate", nil)
|
||||||
|
--LCG.ButtonGlow_Stop(icon)
|
||||||
|
end
|
||||||
|
|
||||||
function Cooldowns:CooldownReady(button, spellId, frame)
|
function Cooldowns:CooldownReady(button, spellId, frame)
|
||||||
if (frame == false) then
|
if (frame == false) then
|
||||||
for _,icon in pairs(button.spellCooldownFrame.icons) do
|
for _,icon in pairs(button.spellCooldownFrame.icons) do
|
||||||
if (icon.spellId == spellId) then
|
if (icon.spellId == spellId) then
|
||||||
icon.active = false
|
resetIcon(icon)
|
||||||
icon.cooldown:Hide()
|
|
||||||
icon.cooldownFont:SetText("")
|
|
||||||
icon:SetScript("OnUpdate", nil)
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
frame.active = false
|
resetIcon(frame)
|
||||||
frame.cooldown:Hide()
|
|
||||||
frame.cooldownFont:SetText("")
|
|
||||||
frame:SetScript("OnUpdate", nil)
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
@ -612,6 +675,13 @@ function Cooldowns:GetOptions()
|
|||||||
name = L["Icon"],
|
name = L["Icon"],
|
||||||
order = 2,
|
order = 2,
|
||||||
},
|
},
|
||||||
|
cooldownIconZoomed = Gladdy:option({
|
||||||
|
type = "toggle",
|
||||||
|
name = L["Zoomed Icon"],
|
||||||
|
desc = L["Zoomes the icon to remove borders"],
|
||||||
|
order = 4,
|
||||||
|
width = "full",
|
||||||
|
}),
|
||||||
cooldownSize = Gladdy:option({
|
cooldownSize = Gladdy:option({
|
||||||
type = "range",
|
type = "range",
|
||||||
name = L["Cooldown size"],
|
name = L["Cooldown size"],
|
||||||
@ -653,6 +723,35 @@ function Cooldowns:GetOptions()
|
|||||||
name = L["Cooldown"],
|
name = L["Cooldown"],
|
||||||
order = 2,
|
order = 2,
|
||||||
},
|
},
|
||||||
|
cooldownIconGlow = Gladdy:option({
|
||||||
|
type = "toggle",
|
||||||
|
name = L["Glow Icon"],
|
||||||
|
desc = L["Glow the icon when cooldown active"],
|
||||||
|
order = 3,
|
||||||
|
width = "full",
|
||||||
|
}),
|
||||||
|
cooldownIconDesaturateOnCooldown = Gladdy:option({
|
||||||
|
type = "toggle",
|
||||||
|
name = L["Desaturate Icon"],
|
||||||
|
order = 4,
|
||||||
|
width = "full",
|
||||||
|
}),
|
||||||
|
cooldownIconAlphaOnCooldown = Gladdy:option({
|
||||||
|
type = "range",
|
||||||
|
name = L["Cooldown alpha on CD"],
|
||||||
|
desc = L["Alpha of the icon when cooldown active"],
|
||||||
|
desc = L["changes "],
|
||||||
|
order = 5,
|
||||||
|
min = 0,
|
||||||
|
max = 1,
|
||||||
|
step = 0.1,
|
||||||
|
width = "full",
|
||||||
|
}),
|
||||||
|
headerCircle = {
|
||||||
|
type = "header",
|
||||||
|
name = L["Cooldowncircle"],
|
||||||
|
order = 6,
|
||||||
|
},
|
||||||
cooldownDisableCircle = Gladdy:option({
|
cooldownDisableCircle = Gladdy:option({
|
||||||
type = "toggle",
|
type = "toggle",
|
||||||
name = L["No Cooldown Circle"],
|
name = L["No Cooldown Circle"],
|
||||||
|
@ -37,6 +37,7 @@ local Diminishings = Gladdy:NewModule("Diminishings", nil, {
|
|||||||
drXOffset = 0,
|
drXOffset = 0,
|
||||||
drYOffset = 0,
|
drYOffset = 0,
|
||||||
drIconSize = 36,
|
drIconSize = 36,
|
||||||
|
drIconZoomed = false,
|
||||||
drEnabled = true,
|
drEnabled = true,
|
||||||
drBorderStyle = "Interface\\AddOns\\Gladdy\\Images\\Border_Gloss",
|
drBorderStyle = "Interface\\AddOns\\Gladdy\\Images\\Border_Gloss",
|
||||||
drBorderColor = { r = 1, g = 1, b = 1, a = 1 },
|
drBorderColor = { r = 1, g = 1, b = 1, a = 1 },
|
||||||
@ -102,6 +103,7 @@ function Diminishings:CreateFrame(unit)
|
|||||||
icon:SetFrameLevel(Gladdy.db.drFrameLevel)
|
icon:SetFrameLevel(Gladdy.db.drFrameLevel)
|
||||||
icon.texture = icon:CreateTexture(nil, "BACKGROUND")
|
icon.texture = icon:CreateTexture(nil, "BACKGROUND")
|
||||||
icon.texture:SetMask("Interface\\AddOns\\Gladdy\\Images\\mask")
|
icon.texture:SetMask("Interface\\AddOns\\Gladdy\\Images\\mask")
|
||||||
|
icon.texture.masked = true
|
||||||
icon.texture:SetAllPoints(icon)
|
icon.texture:SetAllPoints(icon)
|
||||||
icon:SetScript("OnUpdate", function(self, elapsed)
|
icon:SetScript("OnUpdate", function(self, elapsed)
|
||||||
if (self.running) then
|
if (self.running) then
|
||||||
@ -215,6 +217,7 @@ function Diminishings:UpdateFrame(unit)
|
|||||||
0, "drEnabled")
|
0, "drEnabled")
|
||||||
end
|
end
|
||||||
|
|
||||||
|
local testAgain = false
|
||||||
for i = 1, 16 do
|
for i = 1, 16 do
|
||||||
local icon = drFrame["icon" .. i]
|
local icon = drFrame["icon" .. i]
|
||||||
|
|
||||||
@ -242,8 +245,13 @@ function Diminishings:UpdateFrame(unit)
|
|||||||
icon.drLevelText:SetTextColor(Gladdy:SetColor(Gladdy.db.drLevelTextColor))
|
icon.drLevelText:SetTextColor(Gladdy:SetColor(Gladdy.db.drLevelTextColor))
|
||||||
end
|
end
|
||||||
|
|
||||||
icon.cooldown:SetWidth(icon:GetWidth() - icon:GetWidth()/16)
|
if Gladdy.db.drIconZoomed then
|
||||||
icon.cooldown:SetHeight(icon:GetHeight() - icon:GetHeight()/16)
|
icon.cooldown:SetWidth(icon:GetWidth())
|
||||||
|
icon.cooldown:SetHeight(icon:GetHeight())
|
||||||
|
else
|
||||||
|
icon.cooldown:SetWidth(icon:GetWidth() - icon:GetWidth()/16)
|
||||||
|
icon.cooldown:SetHeight(icon:GetHeight() - icon:GetHeight()/16)
|
||||||
|
end
|
||||||
icon.cooldown:ClearAllPoints()
|
icon.cooldown:ClearAllPoints()
|
||||||
icon.cooldown:SetPoint("CENTER", icon, "CENTER")
|
icon.cooldown:SetPoint("CENTER", icon, "CENTER")
|
||||||
if Gladdy.db.drDisableCircle then
|
if Gladdy.db.drDisableCircle then
|
||||||
@ -285,9 +293,27 @@ function Diminishings:UpdateFrame(unit)
|
|||||||
icon.border:SetTexture(Gladdy.db.drBorderStyle)
|
icon.border:SetTexture(Gladdy.db.drBorderStyle)
|
||||||
end
|
end
|
||||||
|
|
||||||
--icon.texture:SetTexCoord(.1, .9, .1, .9)
|
if Gladdy.db.drIconZoomed then
|
||||||
--icon.texture:SetPoint("TOPLEFT", icon, "TOPLEFT", 2, -2)
|
if icon.texture.masked then
|
||||||
--icon.texture:SetPoint("BOTTOMRIGHT", icon, "BOTTOMRIGHT", -2, 2)
|
icon.texture:SetMask(nil)
|
||||||
|
icon.texture:SetTexCoord(0.1,0.9,0.1,0.9)
|
||||||
|
icon.texture.masked = nil
|
||||||
|
end
|
||||||
|
else
|
||||||
|
if not icon.texture.masked then
|
||||||
|
icon.texture:SetMask(nil)
|
||||||
|
icon.texture:SetTexCoord(0,1,0,1)
|
||||||
|
icon.texture:SetMask("Interface\\AddOns\\Gladdy\\Images\\mask")
|
||||||
|
icon.texture.masked = true
|
||||||
|
if Gladdy.frame.testing then
|
||||||
|
testAgain = true
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
if testAgain then
|
||||||
|
Diminishings:ResetUnit(unit)
|
||||||
|
Diminishings:Test(unit)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
@ -574,11 +600,18 @@ function Diminishings:GetOptions()
|
|||||||
name = L["Icon"],
|
name = L["Icon"],
|
||||||
order = 4,
|
order = 4,
|
||||||
},
|
},
|
||||||
|
drIconZoomed = Gladdy:option({
|
||||||
|
type = "toggle",
|
||||||
|
name = L["Zoomed Icon"],
|
||||||
|
desc = L["Zoomes the icon to remove borders"],
|
||||||
|
order = 5,
|
||||||
|
width = "full",
|
||||||
|
}),
|
||||||
drIconSize = Gladdy:option({
|
drIconSize = Gladdy:option({
|
||||||
type = "range",
|
type = "range",
|
||||||
name = L["Icon Size"],
|
name = L["Icon Size"],
|
||||||
desc = L["Size of the DR Icons"],
|
desc = L["Size of the DR Icons"],
|
||||||
order = 5,
|
order = 6,
|
||||||
min = 5,
|
min = 5,
|
||||||
max = 80,
|
max = 80,
|
||||||
step = 1,
|
step = 1,
|
||||||
@ -588,7 +621,7 @@ function Diminishings:GetOptions()
|
|||||||
type = "range",
|
type = "range",
|
||||||
name = L["Icon Width Factor"],
|
name = L["Icon Width Factor"],
|
||||||
desc = L["Stretches the icon"],
|
desc = L["Stretches the icon"],
|
||||||
order = 6,
|
order = 7,
|
||||||
min = 0.5,
|
min = 0.5,
|
||||||
max = 2,
|
max = 2,
|
||||||
step = 0.05,
|
step = 0.05,
|
||||||
@ -598,7 +631,7 @@ function Diminishings:GetOptions()
|
|||||||
type = "range",
|
type = "range",
|
||||||
name = L["Icon Padding"],
|
name = L["Icon Padding"],
|
||||||
desc = L["Space between Icons"],
|
desc = L["Space between Icons"],
|
||||||
order = 7,
|
order = 8,
|
||||||
min = 0,
|
min = 0,
|
||||||
max = 10,
|
max = 10,
|
||||||
step = 0.1,
|
step = 0.1,
|
||||||
|
@ -11,6 +11,7 @@ local Racial = Gladdy:NewModule("Racial", 79, {
|
|||||||
racialEnabled = true,
|
racialEnabled = true,
|
||||||
racialSize = 60 + 20 + 1,
|
racialSize = 60 + 20 + 1,
|
||||||
racialWidthFactor = 0.9,
|
racialWidthFactor = 0.9,
|
||||||
|
racialIconZoomed = false,
|
||||||
racialXOffset = 0,
|
racialXOffset = 0,
|
||||||
racialYOffset = 0,
|
racialYOffset = 0,
|
||||||
racialBorderStyle = "Interface\\AddOns\\Gladdy\\Images\\Border_rounded_blp",
|
racialBorderStyle = "Interface\\AddOns\\Gladdy\\Images\\Border_rounded_blp",
|
||||||
@ -91,6 +92,7 @@ function Racial:CreateFrame(unit)
|
|||||||
racial.texture = racial:CreateTexture(nil, "BACKGROUND")
|
racial.texture = racial:CreateTexture(nil, "BACKGROUND")
|
||||||
racial.texture:SetAllPoints(racial)
|
racial.texture:SetAllPoints(racial)
|
||||||
racial.texture:SetMask("Interface\\AddOns\\Gladdy\\Images\\mask")
|
racial.texture:SetMask("Interface\\AddOns\\Gladdy\\Images\\mask")
|
||||||
|
racial.texture.masked = true
|
||||||
--racial.texture:SetTexture("Interface\\Icons\\INV_Jewelry_TrinketPVP_02")
|
--racial.texture:SetTexture("Interface\\Icons\\INV_Jewelry_TrinketPVP_02")
|
||||||
|
|
||||||
racial.cooldown = CreateFrame("Cooldown", nil, racial, "CooldownFrameTemplate")
|
racial.cooldown = CreateFrame("Cooldown", nil, racial, "CooldownFrameTemplate")
|
||||||
@ -133,6 +135,7 @@ function Racial:UpdateFrame(unit)
|
|||||||
return
|
return
|
||||||
end
|
end
|
||||||
|
|
||||||
|
local testAgain = false
|
||||||
local width, height = Gladdy.db.racialSize * Gladdy.db.racialWidthFactor, Gladdy.db.racialSize
|
local width, height = Gladdy.db.racialSize * Gladdy.db.racialWidthFactor, Gladdy.db.racialSize
|
||||||
|
|
||||||
racial:SetFrameStrata(Gladdy.db.racialFrameStrata)
|
racial:SetFrameStrata(Gladdy.db.racialFrameStrata)
|
||||||
@ -146,8 +149,13 @@ function Racial:UpdateFrame(unit)
|
|||||||
|
|
||||||
racial:SetWidth(width)
|
racial:SetWidth(width)
|
||||||
racial:SetHeight(height)
|
racial:SetHeight(height)
|
||||||
racial.cooldown:SetWidth(width - width/16)
|
if Gladdy.db.racialIconZoomed then
|
||||||
racial.cooldown:SetHeight(height - height/16)
|
racial.cooldown:SetWidth(width)
|
||||||
|
racial.cooldown:SetHeight(height)
|
||||||
|
else
|
||||||
|
racial.cooldown:SetWidth(width - width/16)
|
||||||
|
racial.cooldown:SetHeight(height - height/16)
|
||||||
|
end
|
||||||
racial.cooldown:ClearAllPoints()
|
racial.cooldown:ClearAllPoints()
|
||||||
racial.cooldown:SetPoint("CENTER", racial, "CENTER")
|
racial.cooldown:SetPoint("CENTER", racial, "CENTER")
|
||||||
racial.cooldown.noCooldownCount = true -- Gladdy.db.racialDisableOmniCC
|
racial.cooldown.noCooldownCount = true -- Gladdy.db.racialDisableOmniCC
|
||||||
@ -159,6 +167,24 @@ function Racial:UpdateFrame(unit)
|
|||||||
racial.texture.overlay:SetTexture(Gladdy.db.racialBorderStyle)
|
racial.texture.overlay:SetTexture(Gladdy.db.racialBorderStyle)
|
||||||
racial.texture.overlay:SetVertexColor(Gladdy:SetColor(Gladdy.db.racialBorderColor))
|
racial.texture.overlay:SetVertexColor(Gladdy:SetColor(Gladdy.db.racialBorderColor))
|
||||||
|
|
||||||
|
if Gladdy.db.racialIconZoomed then
|
||||||
|
if racial.texture.masked then
|
||||||
|
racial.texture:SetMask(nil)
|
||||||
|
racial.texture:SetTexCoord(0.1,0.9,0.1,0.9)
|
||||||
|
racial.texture.masked = nil
|
||||||
|
end
|
||||||
|
else
|
||||||
|
if not racial.texture.masked then
|
||||||
|
racial.texture:SetMask(nil)
|
||||||
|
racial.texture:SetTexCoord(0,1,0,1)
|
||||||
|
racial.texture:SetMask("Interface\\AddOns\\Gladdy\\Images\\mask")
|
||||||
|
racial.texture.masked = true
|
||||||
|
if Gladdy.frame.testing then
|
||||||
|
testAgain = true
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
Gladdy:SetPosition(racial, unit, "racialXOffset", "racialYOffset", Racial:LegacySetPosition(racial, unit), Racial)
|
Gladdy:SetPosition(racial, unit, "racialXOffset", "racialYOffset", Racial:LegacySetPosition(racial, unit), Racial)
|
||||||
|
|
||||||
if (Gladdy.db.racialGroup) then
|
if (Gladdy.db.racialGroup) then
|
||||||
@ -189,6 +215,10 @@ function Racial:UpdateFrame(unit)
|
|||||||
racial:Hide()
|
racial:Hide()
|
||||||
else
|
else
|
||||||
racial:Show()
|
racial:Show()
|
||||||
|
if testAgain then
|
||||||
|
Racial:ResetUnit(unit)
|
||||||
|
Racial:Test(unit)
|
||||||
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
@ -311,21 +341,28 @@ function Racial:GetOptions()
|
|||||||
args = {
|
args = {
|
||||||
general = {
|
general = {
|
||||||
type = "group",
|
type = "group",
|
||||||
name = L["Size"],
|
name = L["Icon"],
|
||||||
order = 1,
|
order = 1,
|
||||||
args = {
|
args = {
|
||||||
header = {
|
header = {
|
||||||
type = "header",
|
type = "header",
|
||||||
name = L["Size"],
|
name = L["Icon"],
|
||||||
order = 1,
|
order = 1,
|
||||||
},
|
},
|
||||||
|
racialIconZoomed = Gladdy:option({
|
||||||
|
type = "toggle",
|
||||||
|
name = L["Zoomed Icon"],
|
||||||
|
desc = L["Zoomes the icon to remove borders"],
|
||||||
|
order = 2,
|
||||||
|
width = "full",
|
||||||
|
}),
|
||||||
racialSize = Gladdy:option({
|
racialSize = Gladdy:option({
|
||||||
type = "range",
|
type = "range",
|
||||||
name = L["Icon size"],
|
name = L["Icon size"],
|
||||||
min = 5,
|
min = 5,
|
||||||
max = 100,
|
max = 100,
|
||||||
step = 1,
|
step = 1,
|
||||||
order = 2,
|
order = 3,
|
||||||
width = "full",
|
width = "full",
|
||||||
}),
|
}),
|
||||||
racialWidthFactor = Gladdy:option({
|
racialWidthFactor = Gladdy:option({
|
||||||
@ -334,7 +371,7 @@ function Racial:GetOptions()
|
|||||||
min = 0.5,
|
min = 0.5,
|
||||||
max = 2,
|
max = 2,
|
||||||
step = 0.05,
|
step = 0.05,
|
||||||
order = 3,
|
order = 4,
|
||||||
width = "full",
|
width = "full",
|
||||||
}),
|
}),
|
||||||
},
|
},
|
||||||
|
@ -13,6 +13,7 @@ local Trinket = Gladdy:NewModule("Trinket", 80, {
|
|||||||
trinketEnabled = true,
|
trinketEnabled = true,
|
||||||
trinketSize = 60 + 20 + 1,
|
trinketSize = 60 + 20 + 1,
|
||||||
trinketWidthFactor = 0.9,
|
trinketWidthFactor = 0.9,
|
||||||
|
trinketIconZoomed = false,
|
||||||
trinketBorderStyle = "Interface\\AddOns\\Gladdy\\Images\\Border_rounded_blp",
|
trinketBorderStyle = "Interface\\AddOns\\Gladdy\\Images\\Border_rounded_blp",
|
||||||
trinketBorderColor = { r = 0, g = 0, b = 0, a = 1 },
|
trinketBorderColor = { r = 0, g = 0, b = 0, a = 1 },
|
||||||
trinketDisableCircle = false,
|
trinketDisableCircle = false,
|
||||||
@ -101,6 +102,7 @@ function Trinket:CreateFrame(unit)
|
|||||||
trinket.texture:SetAllPoints(trinket)
|
trinket.texture:SetAllPoints(trinket)
|
||||||
trinket.texture:SetTexture("Interface\\Icons\\INV_Jewelry_TrinketPVP_02")
|
trinket.texture:SetTexture("Interface\\Icons\\INV_Jewelry_TrinketPVP_02")
|
||||||
trinket.texture:SetMask("Interface\\AddOns\\Gladdy\\Images\\mask")
|
trinket.texture:SetMask("Interface\\AddOns\\Gladdy\\Images\\mask")
|
||||||
|
trinket.texture.masked = true
|
||||||
|
|
||||||
trinket.cooldown = CreateFrame("Cooldown", nil, trinket, "CooldownFrameTemplate")
|
trinket.cooldown = CreateFrame("Cooldown", nil, trinket, "CooldownFrameTemplate")
|
||||||
trinket.cooldown.noCooldownCount = true --Gladdy.db.trinketDisableOmniCC
|
trinket.cooldown.noCooldownCount = true --Gladdy.db.trinketDisableOmniCC
|
||||||
@ -144,17 +146,7 @@ function Trinket:UpdateFrame(unit)
|
|||||||
return
|
return
|
||||||
end
|
end
|
||||||
|
|
||||||
if Gladdy.db.trinketColored then
|
local testAgain = false
|
||||||
if trinket.active then
|
|
||||||
trinket:SetBackdropColor(Gladdy:SetColor(Gladdy.db.trinketColoredCd))
|
|
||||||
else
|
|
||||||
trinket:SetBackdropColor(Gladdy:SetColor(Gladdy.db.trinketColoredNoCd))
|
|
||||||
end
|
|
||||||
trinket.texture:SetTexture()
|
|
||||||
else
|
|
||||||
trinket:SetBackdropColor(0,0,0,0)
|
|
||||||
trinket.texture:SetTexture("Interface\\Icons\\INV_Jewelry_TrinketPVP_02")
|
|
||||||
end
|
|
||||||
|
|
||||||
local width, height = Gladdy.db.trinketSize * Gladdy.db.trinketWidthFactor, Gladdy.db.trinketSize
|
local width, height = Gladdy.db.trinketSize * Gladdy.db.trinketWidthFactor, Gladdy.db.trinketSize
|
||||||
|
|
||||||
@ -169,8 +161,14 @@ function Trinket:UpdateFrame(unit)
|
|||||||
|
|
||||||
trinket:SetWidth(width)
|
trinket:SetWidth(width)
|
||||||
trinket:SetHeight(height)
|
trinket:SetHeight(height)
|
||||||
trinket.cooldown:SetWidth(width - width/16)
|
if Gladdy.db.trinketIconZoomed then
|
||||||
trinket.cooldown:SetHeight(height - height/16)
|
trinket.cooldown:SetWidth(width)
|
||||||
|
trinket.cooldown:SetHeight(height)
|
||||||
|
|
||||||
|
else
|
||||||
|
trinket.cooldown:SetWidth(width - width/16)
|
||||||
|
trinket.cooldown:SetHeight(height - height/16)
|
||||||
|
end
|
||||||
trinket.cooldown:ClearAllPoints()
|
trinket.cooldown:ClearAllPoints()
|
||||||
trinket.cooldown:SetPoint("CENTER", trinket, "CENTER")
|
trinket.cooldown:SetPoint("CENTER", trinket, "CENTER")
|
||||||
trinket.cooldown.noCooldownCount = true -- Gladdy.db.trinketDisableOmniCC
|
trinket.cooldown.noCooldownCount = true -- Gladdy.db.trinketDisableOmniCC
|
||||||
@ -182,6 +180,36 @@ function Trinket:UpdateFrame(unit)
|
|||||||
trinket.texture.overlay:SetTexture(Gladdy.db.trinketBorderStyle)
|
trinket.texture.overlay:SetTexture(Gladdy.db.trinketBorderStyle)
|
||||||
trinket.texture.overlay:SetVertexColor(Gladdy:SetColor(Gladdy.db.trinketBorderColor))
|
trinket.texture.overlay:SetVertexColor(Gladdy:SetColor(Gladdy.db.trinketBorderColor))
|
||||||
|
|
||||||
|
if Gladdy.db.trinketIconZoomed then
|
||||||
|
if trinket.texture.masked then
|
||||||
|
trinket.texture:SetMask(nil)
|
||||||
|
trinket.texture:SetTexCoord(0.1,0.9,0.1,0.9)
|
||||||
|
trinket.texture.masked = nil
|
||||||
|
end
|
||||||
|
else
|
||||||
|
if not trinket.texture.masked then
|
||||||
|
trinket.texture:SetMask(nil)
|
||||||
|
trinket.texture:SetTexCoord(0,1,0,1)
|
||||||
|
trinket.texture:SetMask("Interface\\AddOns\\Gladdy\\Images\\mask")
|
||||||
|
trinket.texture.masked = true
|
||||||
|
if Gladdy.frame.testing then
|
||||||
|
testAgain = true
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
if Gladdy.db.trinketColored then
|
||||||
|
if trinket.active then
|
||||||
|
trinket:SetBackdropColor(Gladdy:SetColor(Gladdy.db.trinketColoredCd))
|
||||||
|
else
|
||||||
|
trinket:SetBackdropColor(Gladdy:SetColor(Gladdy.db.trinketColoredNoCd))
|
||||||
|
end
|
||||||
|
trinket.texture:SetTexture()
|
||||||
|
else
|
||||||
|
trinket:SetBackdropColor(0,0,0,0)
|
||||||
|
trinket.texture:SetTexture("Interface\\Icons\\INV_Jewelry_TrinketPVP_02")
|
||||||
|
end
|
||||||
|
|
||||||
Gladdy:SetPosition(trinket, unit, "trinketXOffset", "trinketYOffset", Trinket:LegacySetPosition(trinket, unit), Trinket)
|
Gladdy:SetPosition(trinket, unit, "trinketXOffset", "trinketYOffset", Trinket:LegacySetPosition(trinket, unit), Trinket)
|
||||||
|
|
||||||
if (Gladdy.db.trinketGroup) then
|
if (Gladdy.db.trinketGroup) then
|
||||||
@ -221,6 +249,10 @@ function Trinket:UpdateFrame(unit)
|
|||||||
trinket:Hide()
|
trinket:Hide()
|
||||||
else
|
else
|
||||||
trinket:Show()
|
trinket:Show()
|
||||||
|
if testAgain then
|
||||||
|
Trinket:ResetUnit(unit)
|
||||||
|
Trinket:Test(unit)
|
||||||
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
@ -393,14 +425,21 @@ function Trinket:GetOptions()
|
|||||||
args = {
|
args = {
|
||||||
general = {
|
general = {
|
||||||
type = "group",
|
type = "group",
|
||||||
name = L["Size"],
|
name = L["Icon"],
|
||||||
order = 1,
|
order = 1,
|
||||||
args = {
|
args = {
|
||||||
header = {
|
header = {
|
||||||
type = "header",
|
type = "header",
|
||||||
name = L["Size"],
|
name = L["Icon"],
|
||||||
order = 1,
|
order = 1,
|
||||||
},
|
},
|
||||||
|
trinketIconZoomed = Gladdy:option({
|
||||||
|
type = "toggle",
|
||||||
|
name = L["Zoomed Icon"],
|
||||||
|
desc = L["Zoomes the icon to remove borders"],
|
||||||
|
order = 2,
|
||||||
|
width = "full",
|
||||||
|
}),
|
||||||
trinketSize = Gladdy:option({
|
trinketSize = Gladdy:option({
|
||||||
type = "range",
|
type = "range",
|
||||||
name = L["Size"],
|
name = L["Size"],
|
||||||
|
Loading…
Reference in New Issue
Block a user