zoomed icons auras, buffs, castbar, classicon, cooldowns, diminishing, racial, trinket
This commit is contained in:
@ -20,10 +20,12 @@ local BuffsDebuffs = Gladdy:NewModule("Buffs and Debuffs", nil, {
|
||||
buffsAlpha = 1,
|
||||
buffsIconSize = 30,
|
||||
buffsWidthFactor = 1,
|
||||
buffsIconZoomed = false,
|
||||
buffsIconPadding = 1,
|
||||
buffsBuffsAlpha = 1,
|
||||
buffsBuffsIconSize = 30,
|
||||
buffsBuffsWidthFactor = 1,
|
||||
buffsBuffsIconZoomed = false,
|
||||
buffsBuffsIconPadding = 1,
|
||||
buffsDisableCircle = false,
|
||||
buffsCooldownAlpha = 1,
|
||||
@ -289,6 +291,31 @@ local function styleIcon(aura, auraType)
|
||||
aura.cooldowncircle:SetAlpha(Gladdy.db.buffsCooldownAlpha)
|
||||
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:SetFrameLevel(Gladdy.db.buffsFrameLevel)
|
||||
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.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)
|
||||
|
||||
return testAgain
|
||||
end
|
||||
|
||||
function BuffsDebuffs:UpdateFrameOnce()
|
||||
@ -339,16 +368,23 @@ function BuffsDebuffs:UpdateFrame(unit)
|
||||
0, 0, "buffsEnabled")
|
||||
end
|
||||
|
||||
local testBuffsAgain, testDebuffsAgain
|
||||
|
||||
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
|
||||
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
|
||||
for i=1, #self.framePool do
|
||||
styleIcon(self.framePool[i])
|
||||
end
|
||||
self:UpdateAurasOnUnit(unit)
|
||||
|
||||
if Gladdy.frame.testing and (testBuffsAgain or testDebuffsAgain) then
|
||||
self:ResetUnit(unit)
|
||||
self:Test(unit)
|
||||
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 #self.framePool > 0 then
|
||||
aura = tremove(self.framePool, #self.framePool)
|
||||
styleIcon(aura)
|
||||
else
|
||||
aura = CreateFrame("Frame")
|
||||
aura:EnableMouse(false)
|
||||
@ -425,6 +462,7 @@ function BuffsDebuffs:AddAura(unit, spellID, auraType, duration, timeLeft, stack
|
||||
aura:SetFrameLevel(Gladdy.db.buffsFrameLevel)
|
||||
aura.texture = aura:CreateTexture(nil, "BACKGROUND")
|
||||
aura.texture:SetMask("Interface\\AddOns\\Gladdy\\Images\\mask")
|
||||
aura.texture.masked = true
|
||||
aura.texture:SetAllPoints(aura)
|
||||
aura.cooldowncircle = CreateFrame("Cooldown", nil, aura, "CooldownFrameTemplate")
|
||||
aura.cooldowncircle:SetFrameLevel(Gladdy.db.buffsFrameLevel + 1)
|
||||
@ -529,14 +567,21 @@ function BuffsDebuffs:GetOptions()
|
||||
args = {
|
||||
size = {
|
||||
type = "group",
|
||||
name = L["Size & Padding"],
|
||||
name = L["Icon"],
|
||||
order = 1,
|
||||
args = {
|
||||
header = {
|
||||
type = "header",
|
||||
name = L["Size & Padding"],
|
||||
order = 5,
|
||||
name = L["Icon"],
|
||||
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({
|
||||
type = "range",
|
||||
name = L["Icon Size"],
|
||||
@ -639,14 +684,21 @@ function BuffsDebuffs:GetOptions()
|
||||
args = {
|
||||
size = {
|
||||
type = "group",
|
||||
name = L["Size & Padding"],
|
||||
name = L["Icon"],
|
||||
order = 1,
|
||||
args = {
|
||||
header = {
|
||||
type = "header",
|
||||
name = L["Size & Padding"],
|
||||
order = 5,
|
||||
name = L["Icon"],
|
||||
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({
|
||||
type = "range",
|
||||
name = L["Icon Size"],
|
||||
|
Reference in New Issue
Block a user