fix layers and masks

This commit is contained in:
Sumsebrum 2023-01-18 16:45:28 +01:00
parent 892b5e8a59
commit 387f12a97e
12 changed files with 29 additions and 29 deletions

View File

@ -27,19 +27,19 @@ function ACDFrame:Initialize()
self.ACDNumFrame:SetPoint("CENTER", 0, 128)
self.ACDNumFrame:Hide()
local ACDNumTens = ACDNumFrame:CreateTexture("ACDNumTens", "HIGH")
local ACDNumTens = ACDNumFrame:CreateTexture("ACDNumTens", "OVERLAY")
self.ACDNumTens = ACDNumTens
self.ACDNumTens:SetWidth(Gladdy.db.arenaCountdownSize)
self.ACDNumTens:SetHeight(Gladdy.db.arenaCountdownSize)
self.ACDNumTens:SetPoint("CENTER", self.ACDNumFrame, "CENTER", -(Gladdy.db.arenaCountdownSize/8 + Gladdy.db.arenaCountdownSize/8/2), 0)
local ACDNumOnes = ACDNumFrame:CreateTexture("ACDNumOnes", "HIGH")
local ACDNumOnes = ACDNumFrame:CreateTexture("ACDNumOnes", "OVERLAY")
self.ACDNumOnes = ACDNumOnes
self.ACDNumOnes:SetWidth(Gladdy.db.arenaCountdownSize)
self.ACDNumOnes:SetHeight(Gladdy.db.arenaCountdownSize)
self.ACDNumOnes:SetPoint("CENTER", self.ACDNumFrame, "CENTER", (Gladdy.db.arenaCountdownSize/8 + Gladdy.db.arenaCountdownSize/8/2), 0)
local ACDNumOne = ACDNumFrame:CreateTexture("ACDNumOne", "HIGH")
local ACDNumOne = ACDNumFrame:CreateTexture("ACDNumOne", "OVERLAY")
self.ACDNumOne = ACDNumOne
self.ACDNumOne:SetWidth(Gladdy.db.arenaCountdownSize)
self.ACDNumOne:SetHeight(Gladdy.db.arenaCountdownSize)

View File

@ -331,13 +331,13 @@ function Auras:UpdateFrame(unit)
if Gladdy.db.auraIconZoomed then
if auraFrame.icon.masked then
auraFrame.icon:SetMask(nil)
auraFrame.icon:SetMask("")
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:SetMask("")
auraFrame.icon:SetTexCoord(0,1,0,1)
auraFrame.icon:SetMask("Interface\\AddOns\\Gladdy\\Images\\mask")
auraFrame.icon.masked = true
@ -479,13 +479,13 @@ function Auras:UpdateInterruptFrame(unit)
if Gladdy.db.auraInterruptIconZoomed then
if interruptFrame.icon.masked then
interruptFrame.icon:SetMask(nil)
interruptFrame.icon:SetMask("")
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:SetMask("")
interruptFrame.icon:SetTexCoord(0,1,0,1)
interruptFrame.icon:SetMask("Interface\\AddOns\\Gladdy\\Images\\mask")
interruptFrame.icon.masked = true

View File

@ -300,13 +300,13 @@ local function styleIcon(aura, auraType)
if zoomedOption then
if aura.texture.masked then
aura.texture:SetMask(nil)
aura.texture:SetMask("")
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:SetMask("")
aura.texture:SetTexCoord(0,1,0,1)
aura.texture:SetMask("Interface\\AddOns\\Gladdy\\Images\\mask")
aura.texture.masked = true

View File

@ -123,7 +123,7 @@ function Castbar:CreateFrame(unit)
castBar.icon:SetPoint("LEFT", castBar, "RIGHT", 3, 0) -- Icon of castbar
end
castBar.spellText = castBar:CreateFontString(nil, "LOW")
castBar.spellText = castBar:CreateFontString(nil, "OVERLAY")
castBar.spellText:SetFont(Gladdy:SMFetch("font", "auraFont"), Gladdy.db.castBarFontSize, Gladdy.db.castBarFontOutline and "OUTLINE")
castBar.spellText:SetTextColor(Gladdy:SetColor(Gladdy.db.castBarFontColor))
castBar.spellText:SetShadowOffset(1, -1)
@ -131,7 +131,7 @@ function Castbar:CreateFrame(unit)
castBar.spellText:SetJustifyH("CENTER")
castBar.spellText:SetPoint("LEFT", 10, 0) -- Text of the spell
castBar.timeText = castBar:CreateFontString(nil, "LOW")
castBar.timeText = castBar:CreateFontString(nil, "OVERLAY")
castBar.timeText:SetFont(Gladdy:SMFetch("font", "auraFont"), Gladdy.db.castBarFontSize, Gladdy.db.castBarFontOutline and "OUTLINE")
castBar.timeText:SetTextColor(Gladdy:SetColor(Gladdy.db.castBarFontColor))
castBar.timeText:SetShadowOffset(1, -1)
@ -197,13 +197,13 @@ function Castbar:UpdateFrame(unit)
castBar.icon.texture:SetAllPoints(castBar.icon)
if Gladdy.db.castBarIconZoomed then
if castBar.icon.texture.masked then
castBar.icon.texture:SetMask(nil)
castBar.icon.texture:SetMask("")
castBar.icon.texture:SetTexCoord(0.1,0.9,0.1,0.9)
castBar.icon.texture.masked = nil
end
else
if not castBar.icon.texture.masked then
castBar.icon.texture:SetMask(nil)
castBar.icon.texture:SetMask("")
castBar.icon.texture:SetTexCoord(0,1,0,1)
castBar.icon.texture:SetMask("Interface\\AddOns\\Gladdy\\Images\\mask")
castBar.icon.texture.masked = true

View File

@ -145,13 +145,13 @@ function Classicon:UpdateFrame(unit)
if Gladdy.db.classIconZoomed then
if classIcon.texture.masked then
classIcon.texture:SetMask(nil)
classIcon.texture:SetMask("")
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:SetMask("")
classIcon.texture:SetTexCoord(0,1,0,1)
classIcon.texture:SetMask("Interface\\AddOns\\Gladdy\\Images\\mask")
classIcon.texture.masked = true

View File

@ -196,13 +196,13 @@ function Cooldowns:UpdateIcon(icon)
if Gladdy.db.cooldownIconZoomed then
if icon.texture.masked then
icon.texture:SetMask(nil)
icon.texture:SetMask("")
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:SetMask("")
icon.texture:SetTexCoord(0,1,0,1)
icon.texture:SetMask("Interface\\AddOns\\Gladdy\\Images\\mask")
icon.texture.masked = true

View File

@ -294,13 +294,13 @@ function Diminishings:UpdateFrame(unit)
if Gladdy.db.drIconZoomed then
if icon.texture.masked then
icon.texture:SetMask(nil)
icon.texture:SetMask("")
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:SetMask("")
icon.texture:SetTexCoord(0,1,0,1)
icon.texture:SetMask("Interface\\AddOns\\Gladdy\\Images\\mask")
icon.texture.masked = true

View File

@ -79,7 +79,7 @@ function Healthbar:CreateFrame(unit)
healthBar.bg:SetAlpha(1)
healthBar.bg:SetVertexColor(Gladdy:SetColor(Gladdy.db.healthBarBgColor))
healthBar.nameText = healthBar:CreateFontString(nil, "LOW", "GameFontNormalSmall")
healthBar.nameText = healthBar:CreateFontString(nil, "OVERLAY", "GameFontNormalSmall")
if (Gladdy.db.healthBarNameFontSize < 1) then
healthBar.nameText:SetFont(Gladdy:SMFetch("font", "healthBarNameFont"), 1)
healthBar.nameText:Hide()
@ -93,7 +93,7 @@ function Healthbar:CreateFrame(unit)
healthBar.nameText:SetJustifyH("CENTER")
healthBar.nameText:SetPoint("LEFT", Gladdy.db.healthTextLeftHOffset, Gladdy.db.healthTextLeftVOffset)
healthBar.healthText = healthBar:CreateFontString(nil, "LOW")
healthBar.healthText = healthBar:CreateFontString(nil, "OVERLAY")
if (Gladdy.db.healthBarHealthFontSize < 1) then
healthBar.healthText:SetFont(Gladdy:SMFetch("font", "healthBarFont"), 1)
healthBar.healthText:Hide()

View File

@ -215,7 +215,7 @@ function Pets:CreateFrame(unitId)
healthBar.bg:SetAlpha(1)
healthBar.bg:SetVertexColor(Gladdy:SetColor(Gladdy.db.petHealthBarBgColor))
healthBar.nameText = healthBar:CreateFontString(nil, "LOW", "GameFontNormalSmall")
healthBar.nameText = healthBar:CreateFontString(nil, "OVERLAY", "GameFontNormalSmall")
if (Gladdy.db.petHealthBarFontSize < 1) then
healthBar.nameText:SetFont(Gladdy:SMFetch("font", "petHealthBarFont"), 1)
healthBar.nameText:Hide()
@ -229,7 +229,7 @@ function Pets:CreateFrame(unitId)
healthBar.nameText:SetJustifyH("CENTER")
healthBar.nameText:SetPoint("LEFT", 5, 0)
healthBar.healthText = healthBar:CreateFontString(nil, "LOW")
healthBar.healthText = healthBar:CreateFontString(nil, "OVERLAY")
if (Gladdy.db.petHealthBarFontSize < 1) then
healthBar.healthText:SetFont(Gladdy:SMFetch("font", "petHealthBarFont"), 1)
healthBar.healthText:Hide()

View File

@ -81,7 +81,7 @@ function Powerbar:CreateFrame(unit)
powerBar.bg:SetAllPoints(powerBar.energy)
powerBar.bg:SetVertexColor(Gladdy:SetColor(Gladdy.db.powerBarBgColor))
powerBar.raceText = powerBar:CreateFontString(nil, "LOW")
powerBar.raceText = powerBar:CreateFontString(nil, "OVERLAY")
powerBar.raceText:SetFont(Gladdy:SMFetch("font", "powerBarFont"), Gladdy.db.powerBarRaceFontSize, Gladdy.db.powerTextLeftOutline and "OUTLINE")
powerBar.raceText:SetTextColor(Gladdy:SetColor(Gladdy.db.powerBarFontColor))
powerBar.raceText:SetShadowOffset(1, -1)
@ -89,7 +89,7 @@ function Powerbar:CreateFrame(unit)
powerBar.raceText:SetJustifyH("CENTER")
powerBar.raceText:SetPoint("LEFT", Gladdy.db.powerTextLeftHOffset, Gladdy.db.powerTextLeftVOffset)
powerBar.powerText = powerBar:CreateFontString(nil, "LOW")
powerBar.powerText = powerBar:CreateFontString(nil, "OVERLAY")
powerBar.powerText:SetFont(Gladdy:SMFetch("font", "powerBarFont"), Gladdy.db.powerBarPowerFontSize, Gladdy.db.powerTextRightOutline and "OUTLINE")
powerBar.powerText:SetTextColor(Gladdy:SetColor(Gladdy.db.powerBarFontColor))
powerBar.powerText:SetShadowOffset(1, -1)

View File

@ -169,13 +169,13 @@ function Racial:UpdateFrame(unit)
if Gladdy.db.racialIconZoomed then
if racial.texture.masked then
racial.texture:SetMask(nil)
racial.texture:SetMask("")
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:SetMask("")
racial.texture:SetTexCoord(0,1,0,1)
racial.texture:SetMask("Interface\\AddOns\\Gladdy\\Images\\mask")
racial.texture.masked = true

View File

@ -182,13 +182,13 @@ function Trinket:UpdateFrame(unit)
if Gladdy.db.trinketIconZoomed then
if trinket.texture.masked then
trinket.texture:SetMask(nil)
trinket.texture:SetMask("")
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:SetMask("")
trinket.texture:SetTexCoord(0,1,0,1)
trinket.texture:SetMask("Interface\\AddOns\\Gladdy\\Images\\mask")
trinket.texture.masked = true