LSM replace
This commit is contained in:
parent
f1e1ee4e0b
commit
60c823fa07
12
Gladdy.lua
12
Gladdy.lua
@ -486,12 +486,12 @@ end
|
|||||||
local defaults = {["statusbar"] = "Smooth", ["border"] = "Gladdy Tooltip round", ["font"] = "DorisPP"}
|
local defaults = {["statusbar"] = "Smooth", ["border"] = "Gladdy Tooltip round", ["font"] = "DorisPP"}
|
||||||
|
|
||||||
local lastWarning = {}
|
local lastWarning = {}
|
||||||
function Gladdy:SMFetch(lsmType, key, dbEntry)
|
function Gladdy:SMFetch(lsmType, key)
|
||||||
local smMediaType = self.LSM:Fetch(lsmType, key)
|
local smMediaType = self.LSM:Fetch(lsmType, Gladdy.db[key])
|
||||||
if (smMediaType == nil and key ~= "None") then
|
if (smMediaType == nil and Gladdy.db[key] ~= "None") then
|
||||||
if not lastWarning[dbEntry] or GetTime() - lastWarning[dbEntry] > 120 then
|
if not lastWarning[key] or GetTime() - lastWarning[key] > 120 then
|
||||||
lastWarning[dbEntry] = GetTime()
|
lastWarning[key] = GetTime()
|
||||||
Gladdy:Warn("Could not find", "\"" .. lsmType .. "\"", key, "for", "\"" .. dbEntry .. "\"", "- setting it to", "\"" .. defaults[lsmType] .. "\"")
|
Gladdy:Warn("Could not find", "\"" .. lsmType .. "\" \"", Gladdy.db[key], " \" for", "\"" .. key .. "\"", "- setting it to", "\"" .. defaults[lsmType] .. "\"")
|
||||||
end
|
end
|
||||||
return self.LSM:Fetch(lsmType, defaults[lsmType])
|
return self.LSM:Fetch(lsmType, defaults[lsmType])
|
||||||
end
|
end
|
||||||
|
@ -88,7 +88,7 @@ function Auras:CreateFrame(unit)
|
|||||||
auraFrame:SetAllPoints(classIcon)
|
auraFrame:SetAllPoints(classIcon)
|
||||||
|
|
||||||
auraFrame.text = auraFrame.cooldownFrame:CreateFontString(nil, "OVERLAY")
|
auraFrame.text = auraFrame.cooldownFrame:CreateFontString(nil, "OVERLAY")
|
||||||
auraFrame.text:SetFont(Gladdy:SMFetch("font", Gladdy.db.auraFont, "auraFont"), 10, "OUTLINE")
|
auraFrame.text:SetFont(Gladdy:SMFetch("font", "auraFont"), 10, "OUTLINE")
|
||||||
auraFrame.text:SetTextColor(Gladdy.db.auraFontColor.r, Gladdy.db.auraFontColor.g, Gladdy.db.auraFontColor.b, Gladdy.db.auraFontColor.a)
|
auraFrame.text:SetTextColor(Gladdy.db.auraFontColor.r, Gladdy.db.auraFontColor.g, Gladdy.db.auraFontColor.b, Gladdy.db.auraFontColor.a)
|
||||||
--auraFrame.text:SetShadowOffset(1, -1)
|
--auraFrame.text:SetShadowOffset(1, -1)
|
||||||
--auraFrame.text:SetShadowColor(0, 0, 0, 1)
|
--auraFrame.text:SetShadowColor(0, 0, 0, 1)
|
||||||
@ -152,7 +152,7 @@ function Auras:CreateInterrupt(unit)
|
|||||||
interruptFrame:SetAllPoints(classIcon)
|
interruptFrame:SetAllPoints(classIcon)
|
||||||
|
|
||||||
interruptFrame.text = interruptFrame.cooldownFrame:CreateFontString(nil, "OVERLAY")
|
interruptFrame.text = interruptFrame.cooldownFrame:CreateFontString(nil, "OVERLAY")
|
||||||
interruptFrame.text:SetFont(Gladdy:SMFetch("font", Gladdy.db.auraFont, "auraFont"), 10, "OUTLINE")
|
interruptFrame.text:SetFont(Gladdy:SMFetch("font", "auraFont"), 10, "OUTLINE")
|
||||||
interruptFrame.text:SetTextColor(Gladdy.db.auraFontColor.r, Gladdy.db.auraFontColor.g, Gladdy.db.auraFontColor.b, Gladdy.db.auraFontColor.a)
|
interruptFrame.text:SetTextColor(Gladdy.db.auraFontColor.r, Gladdy.db.auraFontColor.g, Gladdy.db.auraFontColor.b, Gladdy.db.auraFontColor.a)
|
||||||
--auraFrame.text:SetShadowOffset(1, -1)
|
--auraFrame.text:SetShadowOffset(1, -1)
|
||||||
--auraFrame.text:SetShadowColor(0, 0, 0, 1)
|
--auraFrame.text:SetShadowColor(0, 0, 0, 1)
|
||||||
@ -205,7 +205,7 @@ function Auras:UpdateFrame(unit)
|
|||||||
auraFrame.cooldown:SetPoint("CENTER", auraFrame, "CENTER")
|
auraFrame.cooldown:SetPoint("CENTER", auraFrame, "CENTER")
|
||||||
auraFrame.cooldown:SetAlpha(Gladdy.db.auraCooldownAlpha)
|
auraFrame.cooldown:SetAlpha(Gladdy.db.auraCooldownAlpha)
|
||||||
|
|
||||||
auraFrame.text:SetFont(Gladdy:SMFetch("font", Gladdy.db.auraFont, "auraFont"), (width/2 - 1) * Gladdy.db.auraFontSizeScale, "OUTLINE")
|
auraFrame.text:SetFont(Gladdy:SMFetch("font", "auraFont"), (width/2 - 1) * Gladdy.db.auraFontSizeScale, "OUTLINE")
|
||||||
auraFrame.text:SetTextColor(Gladdy.db.auraFontColor.r, Gladdy.db.auraFontColor.g, Gladdy.db.auraFontColor.b, Gladdy.db.auraFontColor.a)
|
auraFrame.text:SetTextColor(Gladdy.db.auraFontColor.r, Gladdy.db.auraFontColor.g, Gladdy.db.auraFontColor.b, Gladdy.db.auraFontColor.a)
|
||||||
|
|
||||||
auraFrame.icon.overlay:SetTexture(Gladdy.db.auraBorderStyle)
|
auraFrame.icon.overlay:SetTexture(Gladdy.db.auraBorderStyle)
|
||||||
@ -243,7 +243,7 @@ function Auras:UpdateInterruptFrame(unit)
|
|||||||
interruptFrame.cooldown:SetPoint("CENTER", interruptFrame, "CENTER")
|
interruptFrame.cooldown:SetPoint("CENTER", interruptFrame, "CENTER")
|
||||||
interruptFrame.cooldown:SetAlpha(Gladdy.db.auraCooldownAlpha)
|
interruptFrame.cooldown:SetAlpha(Gladdy.db.auraCooldownAlpha)
|
||||||
|
|
||||||
interruptFrame.text:SetFont(Gladdy:SMFetch("font", Gladdy.db.auraFont, "auraFont"), (width/2 - 1) * Gladdy.db.auraFontSizeScale, "OUTLINE")
|
interruptFrame.text:SetFont(Gladdy:SMFetch("font", "auraFont"), (width/2 - 1) * Gladdy.db.auraFontSizeScale, "OUTLINE")
|
||||||
interruptFrame.text:SetTextColor(Gladdy.db.auraFontColor.r, Gladdy.db.auraFontColor.g, Gladdy.db.auraFontColor.b, Gladdy.db.auraFontColor.a)
|
interruptFrame.text:SetTextColor(Gladdy.db.auraFontColor.r, Gladdy.db.auraFontColor.g, Gladdy.db.auraFontColor.b, Gladdy.db.auraFontColor.a)
|
||||||
|
|
||||||
interruptFrame.icon.overlay:SetTexture(Gladdy.db.auraBorderStyle)
|
interruptFrame.icon.overlay:SetTexture(Gladdy.db.auraBorderStyle)
|
||||||
@ -496,7 +496,7 @@ function Auras:GetOptions()
|
|||||||
for i,v in ipairs(list) do
|
for i,v in ipairs(list) do
|
||||||
borderArgs["auraSpellSchool" .. v.key] = {
|
borderArgs["auraSpellSchool" .. v.key] = {
|
||||||
type = "color",
|
type = "color",
|
||||||
name = v.val.type,
|
name = L[v.val.type],
|
||||||
order = i + 13,
|
order = i + 13,
|
||||||
hasAlpha = true,
|
hasAlpha = true,
|
||||||
width = "0.8",
|
width = "0.8",
|
||||||
@ -600,21 +600,21 @@ function Auras:GetOptions()
|
|||||||
debuffList = {
|
debuffList = {
|
||||||
type = "group",
|
type = "group",
|
||||||
childGroups = "tree",
|
childGroups = "tree",
|
||||||
name = "Debuffs",
|
name = L["Debuffs"],
|
||||||
order = 4,
|
order = 4,
|
||||||
args = Auras:GetAuraOptions(AURA_TYPE_DEBUFF)
|
args = Auras:GetAuraOptions(AURA_TYPE_DEBUFF)
|
||||||
},
|
},
|
||||||
buffList = {
|
buffList = {
|
||||||
type = "group",
|
type = "group",
|
||||||
childGroups = "tree",
|
childGroups = "tree",
|
||||||
name = "Buffs",
|
name = L["Buffs"],
|
||||||
order = 5,
|
order = 5,
|
||||||
args = Auras:GetAuraOptions(AURA_TYPE_BUFF)
|
args = Auras:GetAuraOptions(AURA_TYPE_BUFF)
|
||||||
},
|
},
|
||||||
interruptList = {
|
interruptList = {
|
||||||
type = "group",
|
type = "group",
|
||||||
childGroups = "tree",
|
childGroups = "tree",
|
||||||
name = "Interrupts",
|
name = L["Interrupts"],
|
||||||
order = 6,
|
order = 6,
|
||||||
args = Auras:GetInterruptOptions()
|
args = Auras:GetInterruptOptions()
|
||||||
}
|
}
|
||||||
|
@ -264,9 +264,9 @@ local function styleIcon(aura, auraType)
|
|||||||
|
|
||||||
aura.border:SetTexture(Gladdy.db.buffsBorderStyle)
|
aura.border:SetTexture(Gladdy.db.buffsBorderStyle)
|
||||||
aura.border:SetVertexColor(spellSchoolToOptionValue(aura.spellSchool))
|
aura.border:SetVertexColor(spellSchoolToOptionValue(aura.spellSchool))
|
||||||
aura.cooldown:SetFont(Gladdy:SMFetch("font", Gladdy.db.buffsFont, "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", Gladdy.db.buffsFont, "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, Gladdy.db.buffsFontColor.a)
|
||||||
end
|
end
|
||||||
|
|
||||||
@ -903,7 +903,7 @@ function BuffsDebuffs:GetOptions()
|
|||||||
},
|
},
|
||||||
font = {
|
font = {
|
||||||
type = "group",
|
type = "group",
|
||||||
name = "Font",
|
name = L["Font"],
|
||||||
order = 4,
|
order = 4,
|
||||||
args = {
|
args = {
|
||||||
header = {
|
header = {
|
||||||
@ -946,7 +946,7 @@ function BuffsDebuffs:GetOptions()
|
|||||||
},
|
},
|
||||||
border = {
|
border = {
|
||||||
type = "group",
|
type = "group",
|
||||||
name = "Border",
|
name = L["Border"],
|
||||||
order = 5,
|
order = 5,
|
||||||
args = {
|
args = {
|
||||||
header = {
|
header = {
|
||||||
@ -1033,7 +1033,7 @@ function BuffsDebuffs:GetOptions()
|
|||||||
},
|
},
|
||||||
},
|
},
|
||||||
debuffList = {
|
debuffList = {
|
||||||
name = "Debuff Lists",
|
name = L["Debuff Lists"],
|
||||||
type = "group",
|
type = "group",
|
||||||
order = 11,
|
order = 11,
|
||||||
childGroups = "tree",
|
childGroups = "tree",
|
||||||
@ -1048,7 +1048,7 @@ function BuffsDebuffs:GetOptions()
|
|||||||
end,
|
end,
|
||||||
},
|
},
|
||||||
buffList = {
|
buffList = {
|
||||||
name = "Buff Lists",
|
name = L["Buff Lists"],
|
||||||
type = "group",
|
type = "group",
|
||||||
order = 12,
|
order = 12,
|
||||||
childGroups = "tree",
|
childGroups = "tree",
|
||||||
|
@ -61,13 +61,13 @@ function Castbar:CreateFrame(unit)
|
|||||||
castBar:EnableMouse(false)
|
castBar:EnableMouse(false)
|
||||||
castBar.unit = unit
|
castBar.unit = unit
|
||||||
|
|
||||||
castBar:SetBackdrop({ edgeFile = Gladdy:SMFetch("border", Gladdy.db.castBarBorderStyle, "castBarBorderStyle"),
|
castBar:SetBackdrop({ edgeFile = Gladdy:SMFetch("border", "castBarBorderStyle"),
|
||||||
edgeSize = Gladdy.db.castBarBorderSize })
|
edgeSize = Gladdy.db.castBarBorderSize })
|
||||||
castBar:SetBackdropBorderColor(Gladdy.db.castBarBorderColor.r, Gladdy.db.castBarBorderColor.g, Gladdy.db.castBarBorderColor.b, Gladdy.db.castBarBorderColor.a)
|
castBar:SetBackdropBorderColor(Gladdy.db.castBarBorderColor.r, Gladdy.db.castBarBorderColor.g, Gladdy.db.castBarBorderColor.b, Gladdy.db.castBarBorderColor.a)
|
||||||
castBar:SetFrameLevel(1)
|
castBar:SetFrameLevel(1)
|
||||||
|
|
||||||
castBar.bar = CreateFrame("StatusBar", nil, castBar)
|
castBar.bar = CreateFrame("StatusBar", nil, castBar)
|
||||||
castBar.bar:SetStatusBarTexture(Gladdy:SMFetch("statusbar", Gladdy.db.castBarTexture, "castBarTexture"))
|
castBar.bar:SetStatusBarTexture(Gladdy:SMFetch("statusbar", "castBarTexture"))
|
||||||
castBar.bar:SetStatusBarColor(Gladdy.db.castBarColor.r, Gladdy.db.castBarColor.g, Gladdy.db.castBarColor.b, Gladdy.db.castBarColor.a)
|
castBar.bar:SetStatusBarColor(Gladdy.db.castBarColor.r, Gladdy.db.castBarColor.g, Gladdy.db.castBarColor.b, Gladdy.db.castBarColor.a)
|
||||||
castBar.bar:SetMinMaxValues(0, 100)
|
castBar.bar:SetMinMaxValues(0, 100)
|
||||||
castBar.bar:SetFrameLevel(0)
|
castBar.bar:SetFrameLevel(0)
|
||||||
@ -81,7 +81,7 @@ function Castbar:CreateFrame(unit)
|
|||||||
|
|
||||||
castBar.bg = castBar.bar:CreateTexture(nil, "BACKGROUND")
|
castBar.bg = castBar.bar:CreateTexture(nil, "BACKGROUND")
|
||||||
castBar.bg:SetAlpha(1)
|
castBar.bg:SetAlpha(1)
|
||||||
castBar.bg:SetTexture(Gladdy:SMFetch("statusbar", Gladdy.db.castBarTexture, "castBarTexture"))
|
castBar.bg:SetTexture(Gladdy:SMFetch("statusbar", "castBarTexture"))
|
||||||
castBar.bg:SetVertexColor(Gladdy.db.castBarBgColor.r, Gladdy.db.castBarBgColor.g, Gladdy.db.castBarBgColor.b, Gladdy.db.castBarBgColor.a)
|
castBar.bg:SetVertexColor(Gladdy.db.castBarBgColor.r, Gladdy.db.castBarBgColor.g, Gladdy.db.castBarBgColor.b, Gladdy.db.castBarBgColor.a)
|
||||||
castBar.bg:SetAllPoints(castBar.bar)
|
castBar.bg:SetAllPoints(castBar.bar)
|
||||||
|
|
||||||
@ -101,7 +101,7 @@ function Castbar:CreateFrame(unit)
|
|||||||
end
|
end
|
||||||
|
|
||||||
castBar.spellText = castBar:CreateFontString(nil, "LOW")
|
castBar.spellText = castBar:CreateFontString(nil, "LOW")
|
||||||
castBar.spellText:SetFont(Gladdy:SMFetch("font", Gladdy.db.auraFont, "auraFont"), Gladdy.db.castBarFontSize)
|
castBar.spellText:SetFont(Gladdy:SMFetch("font", "auraFont"), Gladdy.db.castBarFontSize)
|
||||||
castBar.spellText:SetTextColor(Gladdy.db.castBarFontColor.r, Gladdy.db.castBarFontColor.g, Gladdy.db.castBarFontColor.b, Gladdy.db.castBarFontColor.a)
|
castBar.spellText:SetTextColor(Gladdy.db.castBarFontColor.r, Gladdy.db.castBarFontColor.g, Gladdy.db.castBarFontColor.b, Gladdy.db.castBarFontColor.a)
|
||||||
castBar.spellText:SetShadowOffset(1, -1)
|
castBar.spellText:SetShadowOffset(1, -1)
|
||||||
castBar.spellText:SetShadowColor(0, 0, 0, 1)
|
castBar.spellText:SetShadowColor(0, 0, 0, 1)
|
||||||
@ -109,7 +109,7 @@ function Castbar:CreateFrame(unit)
|
|||||||
castBar.spellText:SetPoint("LEFT", 7, 0) -- Text of the spell
|
castBar.spellText:SetPoint("LEFT", 7, 0) -- Text of the spell
|
||||||
|
|
||||||
castBar.timeText = castBar:CreateFontString(nil, "LOW")
|
castBar.timeText = castBar:CreateFontString(nil, "LOW")
|
||||||
castBar.timeText:SetFont(Gladdy:SMFetch("font", Gladdy.db.auraFont, "auraFont"), Gladdy.db.castBarFontSize)
|
castBar.timeText:SetFont(Gladdy:SMFetch("font", "auraFont"), Gladdy.db.castBarFontSize)
|
||||||
castBar.timeText:SetTextColor(Gladdy.db.castBarFontColor.r, Gladdy.db.castBarFontColor.g, Gladdy.db.castBarFontColor.b, Gladdy.db.castBarFontColor.a)
|
castBar.timeText:SetTextColor(Gladdy.db.castBarFontColor.r, Gladdy.db.castBarFontColor.g, Gladdy.db.castBarFontColor.b, Gladdy.db.castBarFontColor.a)
|
||||||
castBar.timeText:SetShadowOffset(1, -1)
|
castBar.timeText:SetShadowOffset(1, -1)
|
||||||
castBar.timeText:SetShadowColor(0, 0, 0, 1)
|
castBar.timeText:SetShadowColor(0, 0, 0, 1)
|
||||||
@ -129,17 +129,17 @@ function Castbar:UpdateFrame(unit)
|
|||||||
|
|
||||||
castBar:SetWidth(Gladdy.db.castBarWidth)
|
castBar:SetWidth(Gladdy.db.castBarWidth)
|
||||||
castBar:SetHeight(Gladdy.db.castBarHeight)
|
castBar:SetHeight(Gladdy.db.castBarHeight)
|
||||||
castBar:SetBackdrop({ edgeFile = Gladdy:SMFetch("border", Gladdy.db.castBarBorderStyle, "castBarBorderStyle"),
|
castBar:SetBackdrop({ edgeFile = Gladdy:SMFetch("border", "castBarBorderStyle"),
|
||||||
edgeSize = Gladdy.db.castBarBorderSize })
|
edgeSize = Gladdy.db.castBarBorderSize })
|
||||||
castBar:SetBackdropBorderColor(Gladdy.db.castBarBorderColor.r, Gladdy.db.castBarBorderColor.g, Gladdy.db.castBarBorderColor.b, Gladdy.db.castBarBorderColor.a)
|
castBar:SetBackdropBorderColor(Gladdy.db.castBarBorderColor.r, Gladdy.db.castBarBorderColor.g, Gladdy.db.castBarBorderColor.b, Gladdy.db.castBarBorderColor.a)
|
||||||
|
|
||||||
castBar.bar:SetStatusBarTexture(Gladdy:SMFetch("statusbar", Gladdy.db.castBarTexture, "castBarTexture"))
|
castBar.bar:SetStatusBarTexture(Gladdy:SMFetch("statusbar", "castBarTexture"))
|
||||||
castBar.bar:ClearAllPoints()
|
castBar.bar:ClearAllPoints()
|
||||||
castBar.bar:SetStatusBarColor(Gladdy.db.castBarColor.r, Gladdy.db.castBarColor.g, Gladdy.db.castBarColor.b, Gladdy.db.castBarColor.a)
|
castBar.bar:SetStatusBarColor(Gladdy.db.castBarColor.r, Gladdy.db.castBarColor.g, Gladdy.db.castBarColor.b, Gladdy.db.castBarColor.a)
|
||||||
castBar.bar:SetPoint("TOPLEFT", castBar, "TOPLEFT", (Gladdy.db.castBarBorderSize/Gladdy.db.statusbarBorderOffset), -(Gladdy.db.castBarBorderSize/Gladdy.db.statusbarBorderOffset))
|
castBar.bar:SetPoint("TOPLEFT", castBar, "TOPLEFT", (Gladdy.db.castBarBorderSize/Gladdy.db.statusbarBorderOffset), -(Gladdy.db.castBarBorderSize/Gladdy.db.statusbarBorderOffset))
|
||||||
castBar.bar:SetPoint("BOTTOMRIGHT", castBar, "BOTTOMRIGHT", -(Gladdy.db.castBarBorderSize/Gladdy.db.statusbarBorderOffset), (Gladdy.db.castBarBorderSize/Gladdy.db.statusbarBorderOffset))
|
castBar.bar:SetPoint("BOTTOMRIGHT", castBar, "BOTTOMRIGHT", -(Gladdy.db.castBarBorderSize/Gladdy.db.statusbarBorderOffset), (Gladdy.db.castBarBorderSize/Gladdy.db.statusbarBorderOffset))
|
||||||
|
|
||||||
castBar.bg:SetTexture(Gladdy:SMFetch("statusbar", Gladdy.db.castBarTexture, "castBarTexture"))
|
castBar.bg:SetTexture(Gladdy:SMFetch("statusbar", "castBarTexture"))
|
||||||
castBar.bg:SetVertexColor(Gladdy.db.castBarBgColor.r, Gladdy.db.castBarBgColor.g, Gladdy.db.castBarBgColor.b, Gladdy.db.castBarBgColor.a)
|
castBar.bg:SetVertexColor(Gladdy.db.castBarBgColor.r, Gladdy.db.castBarBgColor.g, Gladdy.db.castBarBgColor.b, Gladdy.db.castBarBgColor.a)
|
||||||
|
|
||||||
if Gladdy.db.castBarSparkEnabled then
|
if Gladdy.db.castBarSparkEnabled then
|
||||||
@ -183,10 +183,10 @@ function Castbar:UpdateFrame(unit)
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
castBar.spellText:SetFont(Gladdy:SMFetch("font", Gladdy.db.castBarFont, "castBarFont"), Gladdy.db.castBarFontSize)
|
castBar.spellText:SetFont(Gladdy:SMFetch("font", "castBarFont"), Gladdy.db.castBarFontSize)
|
||||||
castBar.spellText:SetTextColor(Gladdy.db.castBarFontColor.r, Gladdy.db.castBarFontColor.g, Gladdy.db.castBarFontColor.b, Gladdy.db.castBarFontColor.a)
|
castBar.spellText:SetTextColor(Gladdy.db.castBarFontColor.r, Gladdy.db.castBarFontColor.g, Gladdy.db.castBarFontColor.b, Gladdy.db.castBarFontColor.a)
|
||||||
|
|
||||||
castBar.timeText:SetFont(Gladdy:SMFetch("font", Gladdy.db.castBarFont, "castBarFont"), Gladdy.db.castBarFontSize)
|
castBar.timeText:SetFont(Gladdy:SMFetch("font", "castBarFont"), Gladdy.db.castBarFontSize)
|
||||||
castBar.timeText:SetTextColor(Gladdy.db.castBarFontColor.r, Gladdy.db.castBarFontColor.g, Gladdy.db.castBarFontColor.b, Gladdy.db.castBarFontColor.a)
|
castBar.timeText:SetTextColor(Gladdy.db.castBarFontColor.r, Gladdy.db.castBarFontColor.g, Gladdy.db.castBarFontColor.b, Gladdy.db.castBarFontColor.a)
|
||||||
|
|
||||||
castBar.icon.texture.overlay:SetTexture(Gladdy.db.castBarIconStyle)
|
castBar.icon.texture.overlay:SetTexture(Gladdy.db.castBarIconStyle)
|
||||||
|
@ -120,7 +120,7 @@ function Cooldowns:CreateFrame(unit)
|
|||||||
icon.border:SetVertexColor(Gladdy.db.cooldownBorderColor.r, Gladdy.db.cooldownBorderColor.g, Gladdy.db.cooldownBorderColor.b, Gladdy.db.cooldownBorderColor.a)
|
icon.border:SetVertexColor(Gladdy.db.cooldownBorderColor.r, Gladdy.db.cooldownBorderColor.g, Gladdy.db.cooldownBorderColor.b, Gladdy.db.cooldownBorderColor.a)
|
||||||
|
|
||||||
icon.cooldownFont = icon.cooldownFrame:CreateFontString(nil, "OVERLAY")
|
icon.cooldownFont = icon.cooldownFrame:CreateFontString(nil, "OVERLAY")
|
||||||
icon.cooldownFont:SetFont(Gladdy:SMFetch("font", Gladdy.db.cooldownFont, "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.db.cooldownFontColor.r, Gladdy.db.cooldownFontColor.g, Gladdy.db.cooldownFontColor.b, Gladdy.db.cooldownFontColor.a)
|
icon.cooldownFont:SetTextColor(Gladdy.db.cooldownFontColor.r, Gladdy.db.cooldownFontColor.g, Gladdy.db.cooldownFontColor.b, Gladdy.db.cooldownFontColor.a)
|
||||||
icon.cooldownFont:SetAllPoints(icon)
|
icon.cooldownFont:SetAllPoints(icon)
|
||||||
|
|
||||||
@ -172,7 +172,7 @@ function Cooldowns:UpdateFrame(unit)
|
|||||||
local icon = button.spellCooldownFrame["icon" .. j]
|
local icon = button.spellCooldownFrame["icon" .. j]
|
||||||
icon:SetHeight(Gladdy.db.cooldownSize)
|
icon:SetHeight(Gladdy.db.cooldownSize)
|
||||||
icon:SetWidth(Gladdy.db.cooldownSize * Gladdy.db.cooldownWidthFactor)
|
icon:SetWidth(Gladdy.db.cooldownSize * Gladdy.db.cooldownWidthFactor)
|
||||||
icon.cooldownFont:SetFont(Gladdy:SMFetch("font", Gladdy.db.cooldownFont, "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.db.cooldownFontColor.r, Gladdy.db.cooldownFontColor.g, Gladdy.db.cooldownFontColor.b, Gladdy.db.cooldownFontColor.a)
|
icon.cooldownFont:SetTextColor(Gladdy.db.cooldownFontColor.r, Gladdy.db.cooldownFontColor.g, Gladdy.db.cooldownFontColor.b, Gladdy.db.cooldownFontColor.a)
|
||||||
icon:ClearAllPoints()
|
icon:ClearAllPoints()
|
||||||
if (Gladdy.db.cooldownXPos == "RIGHT") then
|
if (Gladdy.db.cooldownXPos == "RIGHT") then
|
||||||
@ -220,7 +220,7 @@ function Cooldowns:UpdateFrame(unit)
|
|||||||
icon.cooldown:SetPoint("CENTER", icon, "CENTER")
|
icon.cooldown:SetPoint("CENTER", icon, "CENTER")
|
||||||
icon.cooldown:SetAlpha(Gladdy.db.cooldownCooldownAlpha)
|
icon.cooldown:SetAlpha(Gladdy.db.cooldownCooldownAlpha)
|
||||||
|
|
||||||
icon.cooldownFont:SetFont(Gladdy:SMFetch("font", Gladdy.db.cooldownFont, "cooldownFont"), (icon:GetWidth()/2 - 1) * Gladdy.db.cooldownFontScale, "OUTLINE")
|
icon.cooldownFont:SetFont(Gladdy:SMFetch("font", "cooldownFont"), (icon:GetWidth()/2 - 1) * Gladdy.db.cooldownFontScale, "OUTLINE")
|
||||||
icon.cooldownFont:SetTextColor(Gladdy.db.cooldownFontColor.r, Gladdy.db.cooldownFontColor.g, Gladdy.db.cooldownFontColor.b, Gladdy.db.cooldownFontColor.a)
|
icon.cooldownFont:SetTextColor(Gladdy.db.cooldownFontColor.r, Gladdy.db.cooldownFontColor.g, Gladdy.db.cooldownFontColor.b, Gladdy.db.cooldownFontColor.a)
|
||||||
|
|
||||||
icon.border:SetTexture(Gladdy.db.cooldownBorderStyle)
|
icon.border:SetTexture(Gladdy.db.cooldownBorderStyle)
|
||||||
@ -294,11 +294,11 @@ function Cooldowns:CooldownStart(button, spellId, duration)
|
|||||||
self.timeLeft = self.timeLeft - elapsed
|
self.timeLeft = self.timeLeft - elapsed
|
||||||
local timeLeft = ceil(self.timeLeft)
|
local timeLeft = ceil(self.timeLeft)
|
||||||
if timeLeft >= 540 then
|
if timeLeft >= 540 then
|
||||||
self.cooldownFont:SetFont(Gladdy:SMFetch("font", Gladdy.db.cooldownFont, "cooldownFont"), Gladdy.db.cooldownSize / 3.1 * Gladdy.db.cooldownFontScale, "OUTLINE")
|
self.cooldownFont:SetFont(Gladdy:SMFetch("font", "cooldownFont"), Gladdy.db.cooldownSize / 3.1 * Gladdy.db.cooldownFontScale, "OUTLINE")
|
||||||
elseif timeLeft < 540 and timeLeft >= 60 then
|
elseif timeLeft < 540 and timeLeft >= 60 then
|
||||||
self.cooldownFont:SetFont(Gladdy:SMFetch("font", Gladdy.db.cooldownFont, "cooldownFont"), Gladdy.db.cooldownSize / 2.15 * Gladdy.db.cooldownFontScale, "OUTLINE")
|
self.cooldownFont:SetFont(Gladdy:SMFetch("font", "cooldownFont"), Gladdy.db.cooldownSize / 2.15 * Gladdy.db.cooldownFontScale, "OUTLINE")
|
||||||
elseif timeLeft < 60 and timeLeft > 0 then
|
elseif timeLeft < 60 and timeLeft > 0 then
|
||||||
self.cooldownFont:SetFont(Gladdy:SMFetch("font", Gladdy.db.cooldownFont, "cooldownFont"), Gladdy.db.cooldownSize / 2.15 * Gladdy.db.cooldownFontScale, "OUTLINE")
|
self.cooldownFont:SetFont(Gladdy:SMFetch("font", "cooldownFont"), Gladdy.db.cooldownSize / 2.15 * Gladdy.db.cooldownFontScale, "OUTLINE")
|
||||||
end
|
end
|
||||||
Gladdy:FormatTimer(self.cooldownFont, self.timeLeft, self.timeLeft < 0)
|
Gladdy:FormatTimer(self.cooldownFont, self.timeLeft, self.timeLeft < 0)
|
||||||
if (self.timeLeft <= 0) then
|
if (self.timeLeft <= 0) then
|
||||||
|
@ -116,7 +116,7 @@ function Diminishings:CreateFrame(unit)
|
|||||||
|
|
||||||
icon.text = icon.cooldownFrame:CreateFontString(nil, "OVERLAY")
|
icon.text = icon.cooldownFrame:CreateFontString(nil, "OVERLAY")
|
||||||
icon.text:SetDrawLayer("OVERLAY")
|
icon.text:SetDrawLayer("OVERLAY")
|
||||||
icon.text:SetFont(Gladdy:SMFetch("font", Gladdy.db.drFont, "drFont"), 10, "OUTLINE")
|
icon.text:SetFont(Gladdy:SMFetch("font", "drFont"), 10, "OUTLINE")
|
||||||
icon.text:SetTextColor(Gladdy.db.drFontColor.r, Gladdy.db.drFontColor.g, Gladdy.db.drFontColor.b, Gladdy.db.drFontColor.a)
|
icon.text:SetTextColor(Gladdy.db.drFontColor.r, Gladdy.db.drFontColor.g, Gladdy.db.drFontColor.b, Gladdy.db.drFontColor.a)
|
||||||
icon.text:SetShadowOffset(1, -1)
|
icon.text:SetShadowOffset(1, -1)
|
||||||
icon.text:SetShadowColor(0, 0, 0, 1)
|
icon.text:SetShadowColor(0, 0, 0, 1)
|
||||||
@ -125,7 +125,7 @@ function Diminishings:CreateFrame(unit)
|
|||||||
|
|
||||||
icon.timeText = icon.cooldownFrame:CreateFontString(nil, "OVERLAY")
|
icon.timeText = icon.cooldownFrame:CreateFontString(nil, "OVERLAY")
|
||||||
icon.timeText:SetDrawLayer("OVERLAY")
|
icon.timeText:SetDrawLayer("OVERLAY")
|
||||||
icon.timeText:SetFont(Gladdy:SMFetch("font", Gladdy.db.drFont, "drFont"), 10, "OUTLINE")
|
icon.timeText:SetFont(Gladdy:SMFetch("font", "drFont"), 10, "OUTLINE")
|
||||||
icon.timeText:SetTextColor(Gladdy.db.drFontColor.r, Gladdy.db.drFontColor.g, Gladdy.db.drFontColor.b, Gladdy.db.drFontColor.a)
|
icon.timeText:SetTextColor(Gladdy.db.drFontColor.r, Gladdy.db.drFontColor.g, Gladdy.db.drFontColor.b, Gladdy.db.drFontColor.a)
|
||||||
icon.timeText:SetShadowOffset(1, -1)
|
icon.timeText:SetShadowOffset(1, -1)
|
||||||
icon.timeText:SetShadowColor(0, 0, 0, 1)
|
icon.timeText:SetShadowColor(0, 0, 0, 1)
|
||||||
@ -184,9 +184,9 @@ function Diminishings:UpdateFrame(unit)
|
|||||||
icon:SetWidth(Gladdy.db.drIconSize * Gladdy.db.drWidthFactor)
|
icon:SetWidth(Gladdy.db.drIconSize * Gladdy.db.drWidthFactor)
|
||||||
icon:SetHeight(Gladdy.db.drIconSize)
|
icon:SetHeight(Gladdy.db.drIconSize)
|
||||||
|
|
||||||
icon.text:SetFont(Gladdy:SMFetch("font", Gladdy.db.drFont, "drFont"), (Gladdy.db.drIconSize/2 - 1) * Gladdy.db.drFontScale, "OUTLINE")
|
icon.text:SetFont(Gladdy:SMFetch("font", "drFont"), (Gladdy.db.drIconSize/2 - 1) * Gladdy.db.drFontScale, "OUTLINE")
|
||||||
icon.text:SetTextColor(Gladdy.db.drFontColor.r, Gladdy.db.drFontColor.g, Gladdy.db.drFontColor.b, Gladdy.db.drFontColor.a)
|
icon.text:SetTextColor(Gladdy.db.drFontColor.r, Gladdy.db.drFontColor.g, Gladdy.db.drFontColor.b, Gladdy.db.drFontColor.a)
|
||||||
icon.timeText:SetFont(Gladdy:SMFetch("font", Gladdy.db.drFont, "drFont"), (Gladdy.db.drIconSize/2 - 1) * Gladdy.db.drFontScale, "OUTLINE")
|
icon.timeText:SetFont(Gladdy:SMFetch("font", "drFont"), (Gladdy.db.drIconSize/2 - 1) * Gladdy.db.drFontScale, "OUTLINE")
|
||||||
icon.timeText:SetTextColor(Gladdy.db.drFontColor.r, Gladdy.db.drFontColor.g, Gladdy.db.drFontColor.b, Gladdy.db.drFontColor.a)
|
icon.timeText:SetTextColor(Gladdy.db.drFontColor.r, Gladdy.db.drFontColor.g, Gladdy.db.drFontColor.b, Gladdy.db.drFontColor.a)
|
||||||
|
|
||||||
icon.cooldown:SetWidth(icon:GetWidth() - icon:GetWidth()/16)
|
icon.cooldown:SetWidth(icon:GetWidth() - icon:GetWidth()/16)
|
||||||
|
@ -39,18 +39,18 @@ function Healthbar:CreateFrame(unit)
|
|||||||
|
|
||||||
local healthBar = CreateFrame("Frame", nil, Gladdy.buttons[unit], BackdropTemplateMixin and "BackdropTemplate")
|
local healthBar = CreateFrame("Frame", nil, Gladdy.buttons[unit], BackdropTemplateMixin and "BackdropTemplate")
|
||||||
healthBar:EnableMouse(false)
|
healthBar:EnableMouse(false)
|
||||||
healthBar:SetBackdrop({ edgeFile = Gladdy:SMFetch("border", Gladdy.db.healthBarBorderStyle, "healthBarBorderStyle"),
|
healthBar:SetBackdrop({ edgeFile = Gladdy:SMFetch("border", "healthBarBorderStyle"),
|
||||||
edgeSize = Gladdy.db.healthBarBorderSize })
|
edgeSize = Gladdy.db.healthBarBorderSize })
|
||||||
healthBar:SetBackdropBorderColor(Gladdy.db.healthBarBorderColor.r, Gladdy.db.healthBarBorderColor.g, Gladdy.db.healthBarBorderColor.b, Gladdy.db.healthBarBorderColor.a)
|
healthBar:SetBackdropBorderColor(Gladdy.db.healthBarBorderColor.r, Gladdy.db.healthBarBorderColor.g, Gladdy.db.healthBarBorderColor.b, Gladdy.db.healthBarBorderColor.a)
|
||||||
healthBar:SetFrameLevel(1)
|
healthBar:SetFrameLevel(1)
|
||||||
|
|
||||||
healthBar.hp = CreateFrame("StatusBar", nil, healthBar)
|
healthBar.hp = CreateFrame("StatusBar", nil, healthBar)
|
||||||
healthBar.hp:SetStatusBarTexture(Gladdy:SMFetch("statusbar", Gladdy.db.healthBarTexture, "healthBarTexture"))
|
healthBar.hp:SetStatusBarTexture(Gladdy:SMFetch("statusbar", "healthBarTexture"))
|
||||||
healthBar.hp:SetMinMaxValues(0, 100)
|
healthBar.hp:SetMinMaxValues(0, 100)
|
||||||
healthBar.hp:SetFrameLevel(0)
|
healthBar.hp:SetFrameLevel(0)
|
||||||
|
|
||||||
healthBar.bg = healthBar.hp:CreateTexture(nil, "BACKGROUND")
|
healthBar.bg = healthBar.hp:CreateTexture(nil, "BACKGROUND")
|
||||||
healthBar.bg:SetTexture(Gladdy:SMFetch("statusbar", Gladdy.db.healthBarTexture, "healthBarTexture"))
|
healthBar.bg:SetTexture(Gladdy:SMFetch("statusbar", "healthBarTexture"))
|
||||||
healthBar.bg:ClearAllPoints()
|
healthBar.bg:ClearAllPoints()
|
||||||
healthBar.bg:SetAllPoints(healthBar.hp)
|
healthBar.bg:SetAllPoints(healthBar.hp)
|
||||||
healthBar.bg:SetAlpha(1)
|
healthBar.bg:SetAlpha(1)
|
||||||
@ -58,10 +58,10 @@ function Healthbar:CreateFrame(unit)
|
|||||||
|
|
||||||
healthBar.nameText = healthBar:CreateFontString(nil, "LOW", "GameFontNormalSmall")
|
healthBar.nameText = healthBar:CreateFontString(nil, "LOW", "GameFontNormalSmall")
|
||||||
if (Gladdy.db.healthBarNameFontSize < 1) then
|
if (Gladdy.db.healthBarNameFontSize < 1) then
|
||||||
healthBar.nameText:SetFont(Gladdy:SMFetch("font", Gladdy.db.healthBarNameFont, "healthBarNameFont"), 1)
|
healthBar.nameText:SetFont(Gladdy:SMFetch("font", "healthBarNameFont"), 1)
|
||||||
healthBar.nameText:Hide()
|
healthBar.nameText:Hide()
|
||||||
else
|
else
|
||||||
healthBar.nameText:SetFont(Gladdy:SMFetch("font", Gladdy.db.healthBarFont, "healthBarFont"), Gladdy.db.healthBarNameFontSize)
|
healthBar.nameText:SetFont(Gladdy:SMFetch("font", "healthBarFont"), Gladdy.db.healthBarNameFontSize)
|
||||||
healthBar.nameText:Show()
|
healthBar.nameText:Show()
|
||||||
end
|
end
|
||||||
healthBar.nameText:SetTextColor(Gladdy.db.healthBarFontColor.r, Gladdy.db.healthBarFontColor.g, Gladdy.db.healthBarFontColor.b, Gladdy.db.healthBarFontColor.a)
|
healthBar.nameText:SetTextColor(Gladdy.db.healthBarFontColor.r, Gladdy.db.healthBarFontColor.g, Gladdy.db.healthBarFontColor.b, Gladdy.db.healthBarFontColor.a)
|
||||||
@ -72,10 +72,10 @@ function Healthbar:CreateFrame(unit)
|
|||||||
|
|
||||||
healthBar.healthText = healthBar:CreateFontString(nil, "LOW")
|
healthBar.healthText = healthBar:CreateFontString(nil, "LOW")
|
||||||
if (Gladdy.db.healthBarHealthFontSize < 1) then
|
if (Gladdy.db.healthBarHealthFontSize < 1) then
|
||||||
healthBar.healthText:SetFont(Gladdy:SMFetch("font", Gladdy.db.healthBarFont, "healthBarFont"), 1)
|
healthBar.healthText:SetFont(Gladdy:SMFetch("font", "healthBarFont"), 1)
|
||||||
healthBar.healthText:Hide()
|
healthBar.healthText:Hide()
|
||||||
else
|
else
|
||||||
healthBar.healthText:SetFont(Gladdy:SMFetch("font", Gladdy.db.healthBarFont, "healthBarFont"), Gladdy.db.healthBarHealthFontSize)
|
healthBar.healthText:SetFont(Gladdy:SMFetch("font", "healthBarFont"), Gladdy.db.healthBarHealthFontSize)
|
||||||
healthBar.healthText:Hide()
|
healthBar.healthText:Hide()
|
||||||
end
|
end
|
||||||
healthBar.healthText:SetTextColor(Gladdy.db.healthBarFontColor.r, Gladdy.db.healthBarFontColor.g, Gladdy.db.healthBarFontColor.b, Gladdy.db.healthBarFontColor.a)
|
healthBar.healthText:SetTextColor(Gladdy.db.healthBarFontColor.r, Gladdy.db.healthBarFontColor.g, Gladdy.db.healthBarFontColor.b, Gladdy.db.healthBarFontColor.a)
|
||||||
@ -167,33 +167,33 @@ function Healthbar:UpdateFrame(unit)
|
|||||||
return
|
return
|
||||||
end
|
end
|
||||||
|
|
||||||
healthBar.bg:SetTexture(Gladdy:SMFetch("statusbar", Gladdy.db.healthBarTexture, "healthBarTexture"))
|
healthBar.bg:SetTexture(Gladdy:SMFetch("statusbar", "healthBarTexture"))
|
||||||
healthBar.bg:SetVertexColor(Gladdy.db.healthBarBgColor.r, Gladdy.db.healthBarBgColor.g, Gladdy.db.healthBarBgColor.b, Gladdy.db.healthBarBgColor.a)
|
healthBar.bg:SetVertexColor(Gladdy.db.healthBarBgColor.r, Gladdy.db.healthBarBgColor.g, Gladdy.db.healthBarBgColor.b, Gladdy.db.healthBarBgColor.a)
|
||||||
|
|
||||||
healthBar:SetBackdrop({ edgeFile = Gladdy:SMFetch("border", Gladdy.db.healthBarBorderStyle, "healthBarBorderStyle"),
|
healthBar:SetBackdrop({ edgeFile = Gladdy:SMFetch("border", "healthBarBorderStyle"),
|
||||||
edgeSize = Gladdy.db.healthBarBorderSize })
|
edgeSize = Gladdy.db.healthBarBorderSize })
|
||||||
healthBar:SetBackdropBorderColor(Gladdy.db.healthBarBorderColor.r, Gladdy.db.healthBarBorderColor.g, Gladdy.db.healthBarBorderColor.b, Gladdy.db.healthBarBorderColor.a)
|
healthBar:SetBackdropBorderColor(Gladdy.db.healthBarBorderColor.r, Gladdy.db.healthBarBorderColor.g, Gladdy.db.healthBarBorderColor.b, Gladdy.db.healthBarBorderColor.a)
|
||||||
healthBar:ClearAllPoints()
|
healthBar:ClearAllPoints()
|
||||||
healthBar:SetPoint("TOPLEFT", Gladdy.buttons[unit], "TOPLEFT", 0, 0)
|
healthBar:SetPoint("TOPLEFT", Gladdy.buttons[unit], "TOPLEFT", 0, 0)
|
||||||
healthBar:SetPoint("BOTTOMRIGHT", Gladdy.buttons[unit], "BOTTOMRIGHT")
|
healthBar:SetPoint("BOTTOMRIGHT", Gladdy.buttons[unit], "BOTTOMRIGHT")
|
||||||
|
|
||||||
healthBar.hp:SetStatusBarTexture(Gladdy:SMFetch("statusbar", Gladdy.db.healthBarTexture, "healthBarTexture"))
|
healthBar.hp:SetStatusBarTexture(Gladdy:SMFetch("statusbar", "healthBarTexture"))
|
||||||
healthBar.hp:ClearAllPoints()
|
healthBar.hp:ClearAllPoints()
|
||||||
healthBar.hp:SetPoint("TOPLEFT", healthBar, "TOPLEFT", (Gladdy.db.healthBarBorderSize/Gladdy.db.statusbarBorderOffset), -(Gladdy.db.healthBarBorderSize/Gladdy.db.statusbarBorderOffset))
|
healthBar.hp:SetPoint("TOPLEFT", healthBar, "TOPLEFT", (Gladdy.db.healthBarBorderSize/Gladdy.db.statusbarBorderOffset), -(Gladdy.db.healthBarBorderSize/Gladdy.db.statusbarBorderOffset))
|
||||||
healthBar.hp:SetPoint("BOTTOMRIGHT", healthBar, "BOTTOMRIGHT", -(Gladdy.db.healthBarBorderSize/Gladdy.db.statusbarBorderOffset), (Gladdy.db.healthBarBorderSize/Gladdy.db.statusbarBorderOffset))
|
healthBar.hp:SetPoint("BOTTOMRIGHT", healthBar, "BOTTOMRIGHT", -(Gladdy.db.healthBarBorderSize/Gladdy.db.statusbarBorderOffset), (Gladdy.db.healthBarBorderSize/Gladdy.db.statusbarBorderOffset))
|
||||||
|
|
||||||
if (Gladdy.db.healthBarHealthFontSize < 1) then
|
if (Gladdy.db.healthBarHealthFontSize < 1) then
|
||||||
healthBar.healthText:SetFont(Gladdy:SMFetch("font", Gladdy.db.healthBarFont, "healthBarFont"), 1)
|
healthBar.healthText:SetFont(Gladdy:SMFetch("font", "healthBarFont"), 1)
|
||||||
healthBar.healthText:Hide()
|
healthBar.healthText:Hide()
|
||||||
else
|
else
|
||||||
healthBar.healthText:SetFont(Gladdy:SMFetch("font", Gladdy.db.healthBarFont, "healthBarFont"), Gladdy.db.healthBarHealthFontSize)
|
healthBar.healthText:SetFont(Gladdy:SMFetch("font", "healthBarFont"), Gladdy.db.healthBarHealthFontSize)
|
||||||
healthBar.healthText:Show()
|
healthBar.healthText:Show()
|
||||||
end
|
end
|
||||||
if (Gladdy.db.healthBarNameFontSize < 1) then
|
if (Gladdy.db.healthBarNameFontSize < 1) then
|
||||||
healthBar.nameText:SetFont(Gladdy:SMFetch("font", Gladdy.db.healthBarNameFont, "healthBarNameFont"), 1)
|
healthBar.nameText:SetFont(Gladdy:SMFetch("font", "healthBarNameFont"), 1)
|
||||||
healthBar.nameText:Hide()
|
healthBar.nameText:Hide()
|
||||||
else
|
else
|
||||||
healthBar.nameText:SetFont(Gladdy:SMFetch("font", Gladdy.db.healthBarFont, "healthBarFont"), Gladdy.db.healthBarNameFontSize)
|
healthBar.nameText:SetFont(Gladdy:SMFetch("font", "healthBarFont"), Gladdy.db.healthBarNameFontSize)
|
||||||
if Gladdy.db.healthName then
|
if Gladdy.db.healthName then
|
||||||
healthBar.nameText:Show()
|
healthBar.nameText:Show()
|
||||||
else
|
else
|
||||||
|
@ -55,17 +55,17 @@ function Highlight:CreateFrame(unit)
|
|||||||
local healthBar = Gladdy.modules["Health Bar"].frames[unit]
|
local healthBar = Gladdy.modules["Health Bar"].frames[unit]
|
||||||
|
|
||||||
local targetBorder = CreateFrame("Frame", nil, button, BackdropTemplateMixin and "BackdropTemplate")
|
local targetBorder = CreateFrame("Frame", nil, button, BackdropTemplateMixin and "BackdropTemplate")
|
||||||
targetBorder:SetBackdrop({ edgeFile = Gladdy:SMFetch("border", Gladdy.db.highlightBorderStyle, "highlightBorderStyle"), edgeSize = Gladdy.db.highlightBorderSize })
|
targetBorder:SetBackdrop({ edgeFile = Gladdy:SMFetch("border", "highlightBorderStyle"), edgeSize = Gladdy.db.highlightBorderSize })
|
||||||
--targetBorder:SetFrameStrata("MEDIUM")
|
--targetBorder:SetFrameStrata("MEDIUM")
|
||||||
targetBorder:Hide()
|
targetBorder:Hide()
|
||||||
|
|
||||||
local focusBorder = CreateFrame("Frame", nil, button, BackdropTemplateMixin and "BackdropTemplate")
|
local focusBorder = CreateFrame("Frame", nil, button, BackdropTemplateMixin and "BackdropTemplate")
|
||||||
focusBorder:SetBackdrop({ edgeFile = Gladdy:SMFetch("border", Gladdy.db.highlightBorderStyle, "highlightBorderStyle"), edgeSize = Gladdy.db.highlightBorderSize })
|
focusBorder:SetBackdrop({ edgeFile = Gladdy:SMFetch("border", "highlightBorderStyle"), edgeSize = Gladdy.db.highlightBorderSize })
|
||||||
--focusBorder:SetFrameStrata("MEDIUM")
|
--focusBorder:SetFrameStrata("MEDIUM")
|
||||||
focusBorder:Hide()
|
focusBorder:Hide()
|
||||||
|
|
||||||
local leaderBorder = CreateFrame("Frame", nil, button, BackdropTemplateMixin and "BackdropTemplate")
|
local leaderBorder = CreateFrame("Frame", nil, button, BackdropTemplateMixin and "BackdropTemplate")
|
||||||
leaderBorder:SetBackdrop({ edgeFile = Gladdy:SMFetch("border", Gladdy.db.highlightBorderStyle, "highlightBorderStyle"), edgeSize = Gladdy.db.highlightBorderSize })
|
leaderBorder:SetBackdrop({ edgeFile = Gladdy:SMFetch("border", "highlightBorderStyle"), edgeSize = Gladdy.db.highlightBorderSize })
|
||||||
--leaderBorder:SetFrameStrata("MEDIUM")
|
--leaderBorder:SetFrameStrata("MEDIUM")
|
||||||
leaderBorder:Hide()
|
leaderBorder:Hide()
|
||||||
|
|
||||||
@ -106,7 +106,7 @@ function Highlight:UpdateFrame(unit)
|
|||||||
button.targetBorder:SetPoint("TOP", button.healthBar, "TOP", 0, (Gladdy.db.highlightInset and 0 or borderSize))
|
button.targetBorder:SetPoint("TOP", button.healthBar, "TOP", 0, (Gladdy.db.highlightInset and 0 or borderSize))
|
||||||
end
|
end
|
||||||
|
|
||||||
button.targetBorder:SetBackdrop({ edgeFile = Gladdy:SMFetch("border", Gladdy.db.highlightBorderStyle, "highlightBorderStyle"), edgeSize = borderSize })
|
button.targetBorder:SetBackdrop({ edgeFile = Gladdy:SMFetch("border", "highlightBorderStyle"), edgeSize = borderSize })
|
||||||
button.targetBorder:SetBackdropBorderColor(Gladdy.db.targetBorderColor.r, Gladdy.db.targetBorderColor.g, Gladdy.db.targetBorderColor.b, Gladdy.db.targetBorderColor.a)
|
button.targetBorder:SetBackdropBorderColor(Gladdy.db.targetBorderColor.r, Gladdy.db.targetBorderColor.g, Gladdy.db.targetBorderColor.b, Gladdy.db.targetBorderColor.a)
|
||||||
|
|
||||||
button.focusBorder:SetWidth(width)
|
button.focusBorder:SetWidth(width)
|
||||||
@ -119,7 +119,7 @@ function Highlight:UpdateFrame(unit)
|
|||||||
button.focusBorder:SetPoint("TOP", button.healthBar, "TOP", 0, (Gladdy.db.highlightInset and 0 or borderSize))
|
button.focusBorder:SetPoint("TOP", button.healthBar, "TOP", 0, (Gladdy.db.highlightInset and 0 or borderSize))
|
||||||
end
|
end
|
||||||
|
|
||||||
button.focusBorder:SetBackdrop({ edgeFile = Gladdy:SMFetch("border", Gladdy.db.highlightBorderStyle, "highlightBorderStyle"), edgeSize = borderSize })
|
button.focusBorder:SetBackdrop({ edgeFile = Gladdy:SMFetch("border", "highlightBorderStyle"), edgeSize = borderSize })
|
||||||
button.focusBorder:SetBackdropBorderColor(Gladdy.db.focusBorderColor.r, Gladdy.db.focusBorderColor.g, Gladdy.db.focusBorderColor.b, Gladdy.db.focusBorderColor.a)
|
button.focusBorder:SetBackdropBorderColor(Gladdy.db.focusBorderColor.r, Gladdy.db.focusBorderColor.g, Gladdy.db.focusBorderColor.b, Gladdy.db.focusBorderColor.a)
|
||||||
|
|
||||||
button.leaderBorder:SetWidth(width)
|
button.leaderBorder:SetWidth(width)
|
||||||
@ -132,7 +132,7 @@ function Highlight:UpdateFrame(unit)
|
|||||||
button.leaderBorder:SetPoint("TOP", button.healthBar, "TOP", 0, (Gladdy.db.highlightInset and 0 or borderSize))
|
button.leaderBorder:SetPoint("TOP", button.healthBar, "TOP", 0, (Gladdy.db.highlightInset and 0 or borderSize))
|
||||||
end
|
end
|
||||||
|
|
||||||
button.leaderBorder:SetBackdrop({ edgeFile = Gladdy:SMFetch("border", Gladdy.db.highlightBorderStyle, "highlightBorderStyle"), edgeSize = borderSize })
|
button.leaderBorder:SetBackdrop({ edgeFile = Gladdy:SMFetch("border", "highlightBorderStyle"), edgeSize = borderSize })
|
||||||
button.leaderBorder:SetBackdropBorderColor(Gladdy.db.leaderBorderColor.r, Gladdy.db.leaderBorderColor.g, Gladdy.db.leaderBorderColor.b, Gladdy.db.leaderBorderColor.a)
|
button.leaderBorder:SetBackdropBorderColor(Gladdy.db.leaderBorderColor.r, Gladdy.db.leaderBorderColor.g, Gladdy.db.leaderBorderColor.b, Gladdy.db.leaderBorderColor.a)
|
||||||
if Gladdy.frame.testing then
|
if Gladdy.frame.testing then
|
||||||
Highlight:Test(unit)
|
Highlight:Test(unit)
|
||||||
|
@ -149,7 +149,7 @@ function Pets:CreateFrame(unitId)
|
|||||||
button.secure = secure
|
button.secure = secure
|
||||||
|
|
||||||
local healthBar = CreateFrame("Frame", nil, button, BackdropTemplateMixin and "BackdropTemplate")
|
local healthBar = CreateFrame("Frame", nil, button, BackdropTemplateMixin and "BackdropTemplate")
|
||||||
healthBar:SetBackdrop({ edgeFile = Gladdy:SMFetch("border", Gladdy.db.petHealthBarBorderStyle, "petHealthBarBorderStyle"),
|
healthBar:SetBackdrop({ edgeFile = Gladdy:SMFetch("border", "petHealthBarBorderStyle"),
|
||||||
edgeSize = Gladdy.db.petHealthBarBorderSize })
|
edgeSize = Gladdy.db.petHealthBarBorderSize })
|
||||||
healthBar:SetBackdropBorderColor(Gladdy.db.petHealthBarBorderColor.r, Gladdy.db.petHealthBarBorderColor.g, Gladdy.db.petHealthBarBorderColor.b, Gladdy.db.petHealthBarBorderColor.a)
|
healthBar:SetBackdropBorderColor(Gladdy.db.petHealthBarBorderColor.r, Gladdy.db.petHealthBarBorderColor.g, Gladdy.db.petHealthBarBorderColor.b, Gladdy.db.petHealthBarBorderColor.a)
|
||||||
healthBar:SetFrameLevel(1)
|
healthBar:SetFrameLevel(1)
|
||||||
@ -167,14 +167,14 @@ function Pets:CreateFrame(unitId)
|
|||||||
|
|
||||||
|
|
||||||
healthBar.hp = CreateFrame("StatusBar", nil, healthBar)
|
healthBar.hp = CreateFrame("StatusBar", nil, healthBar)
|
||||||
healthBar.hp:SetStatusBarTexture(Gladdy:SMFetch("statusbar", Gladdy.db.petHealthBarTexture, "petHealthBarTexture"))
|
healthBar.hp:SetStatusBarTexture(Gladdy:SMFetch("statusbar", "petHealthBarTexture"))
|
||||||
healthBar.hp:SetStatusBarColor(Gladdy.db.petHealthBarColor.r, Gladdy.db.petHealthBarColor.g, Gladdy.db.petHealthBarColor.b, Gladdy.db.petHealthBarColor.a)
|
healthBar.hp:SetStatusBarColor(Gladdy.db.petHealthBarColor.r, Gladdy.db.petHealthBarColor.g, Gladdy.db.petHealthBarColor.b, Gladdy.db.petHealthBarColor.a)
|
||||||
healthBar.hp:SetMinMaxValues(0, 100)
|
healthBar.hp:SetMinMaxValues(0, 100)
|
||||||
healthBar.hp:SetFrameLevel(0)
|
healthBar.hp:SetFrameLevel(0)
|
||||||
healthBar.hp:SetAllPoints(healthBar)
|
healthBar.hp:SetAllPoints(healthBar)
|
||||||
|
|
||||||
healthBar.bg = healthBar.hp:CreateTexture(nil, "BACKGROUND")
|
healthBar.bg = healthBar.hp:CreateTexture(nil, "BACKGROUND")
|
||||||
healthBar.bg:SetTexture(Gladdy:SMFetch("statusbar", Gladdy.db.petHealthBarTexture, "petHealthBarTexture"))
|
healthBar.bg:SetTexture(Gladdy:SMFetch("statusbar", "petHealthBarTexture"))
|
||||||
healthBar.bg:ClearAllPoints()
|
healthBar.bg:ClearAllPoints()
|
||||||
healthBar.bg:SetAllPoints(healthBar.hp)
|
healthBar.bg:SetAllPoints(healthBar.hp)
|
||||||
healthBar.bg:SetAlpha(1)
|
healthBar.bg:SetAlpha(1)
|
||||||
@ -182,10 +182,10 @@ function Pets:CreateFrame(unitId)
|
|||||||
|
|
||||||
healthBar.nameText = healthBar:CreateFontString(nil, "LOW", "GameFontNormalSmall")
|
healthBar.nameText = healthBar:CreateFontString(nil, "LOW", "GameFontNormalSmall")
|
||||||
if (Gladdy.db.petHealthBarFontSize < 1) then
|
if (Gladdy.db.petHealthBarFontSize < 1) then
|
||||||
healthBar.nameText:SetFont(Gladdy:SMFetch("font", Gladdy.db.petHealthBarFont, "petHealthBarFont"), 1)
|
healthBar.nameText:SetFont(Gladdy:SMFetch("font", "petHealthBarFont"), 1)
|
||||||
healthBar.nameText:Hide()
|
healthBar.nameText:Hide()
|
||||||
else
|
else
|
||||||
healthBar.nameText:SetFont(Gladdy:SMFetch("font", Gladdy.db.petHealthBarFont, "petHealthBarFont"), Gladdy.db.petHealthBarFontSize)
|
healthBar.nameText:SetFont(Gladdy:SMFetch("font", "petHealthBarFont"), Gladdy.db.petHealthBarFontSize)
|
||||||
healthBar.nameText:Show()
|
healthBar.nameText:Show()
|
||||||
end
|
end
|
||||||
healthBar.nameText:SetTextColor(Gladdy.db.petHealthBarFontColor.r, Gladdy.db.petHealthBarFontColor.g, Gladdy.db.petHealthBarFontColor.b, Gladdy.db.petHealthBarFontColor.a)
|
healthBar.nameText:SetTextColor(Gladdy.db.petHealthBarFontColor.r, Gladdy.db.petHealthBarFontColor.g, Gladdy.db.petHealthBarFontColor.b, Gladdy.db.petHealthBarFontColor.a)
|
||||||
@ -196,10 +196,10 @@ function Pets:CreateFrame(unitId)
|
|||||||
|
|
||||||
healthBar.healthText = healthBar:CreateFontString(nil, "LOW")
|
healthBar.healthText = healthBar:CreateFontString(nil, "LOW")
|
||||||
if (Gladdy.db.petHealthBarFontSize < 1) then
|
if (Gladdy.db.petHealthBarFontSize < 1) then
|
||||||
healthBar.healthText:SetFont(Gladdy:SMFetch("font", Gladdy.db.petHealthBarFont, "petHealthBarFont"), 1)
|
healthBar.healthText:SetFont(Gladdy:SMFetch("font", "petHealthBarFont"), 1)
|
||||||
healthBar.healthText:Hide()
|
healthBar.healthText:Hide()
|
||||||
else
|
else
|
||||||
healthBar.healthText:SetFont(Gladdy:SMFetch("font", Gladdy.db.petHealthBarFont, "petHealthBarFont"), Gladdy.db.petHealthBarFontSize)
|
healthBar.healthText:SetFont(Gladdy:SMFetch("font", "petHealthBarFont"), Gladdy.db.petHealthBarFontSize)
|
||||||
healthBar.healthText:Hide()
|
healthBar.healthText:Hide()
|
||||||
end
|
end
|
||||||
healthBar.healthText:SetTextColor(Gladdy.db.petHealthBarFontColor.r, Gladdy.db.petHealthBarFontColor.g, Gladdy.db.petHealthBarFontColor.b, Gladdy.db.petHealthBarFontColor.a)
|
healthBar.healthText:SetTextColor(Gladdy.db.petHealthBarFontColor.r, Gladdy.db.petHealthBarFontColor.g, Gladdy.db.petHealthBarFontColor.b, Gladdy.db.petHealthBarFontColor.a)
|
||||||
@ -263,28 +263,28 @@ function Pets:UpdateFrame(unitId)
|
|||||||
healthBar.portrait.border:SetTexture(Gladdy.db.petPortraitBorderStyle)
|
healthBar.portrait.border:SetTexture(Gladdy.db.petPortraitBorderStyle)
|
||||||
healthBar.portrait.border:SetVertexColor(Gladdy.db.petHealthBarBorderColor.r, Gladdy.db.petHealthBarBorderColor.g, Gladdy.db.petHealthBarBorderColor.b, Gladdy.db.petHealthBarBorderColor.a)
|
healthBar.portrait.border:SetVertexColor(Gladdy.db.petHealthBarBorderColor.r, Gladdy.db.petHealthBarBorderColor.g, Gladdy.db.petHealthBarBorderColor.b, Gladdy.db.petHealthBarBorderColor.a)
|
||||||
|
|
||||||
healthBar.bg:SetTexture(Gladdy:SMFetch("statusbar", Gladdy.db.petHealthBarTexture, "petHealthBarTexture"))
|
healthBar.bg:SetTexture(Gladdy:SMFetch("statusbar", "petHealthBarTexture"))
|
||||||
healthBar.bg:SetVertexColor(Gladdy.db.petHealthBarBgColor.r, Gladdy.db.petHealthBarBgColor.g, Gladdy.db.petHealthBarBgColor.b, Gladdy.db.petHealthBarBgColor.a)
|
healthBar.bg:SetVertexColor(Gladdy.db.petHealthBarBgColor.r, Gladdy.db.petHealthBarBgColor.g, Gladdy.db.petHealthBarBgColor.b, Gladdy.db.petHealthBarBgColor.a)
|
||||||
|
|
||||||
healthBar:SetBackdrop({ edgeFile = Gladdy:SMFetch("border", Gladdy.db.petHealthBarBorderStyle, "petHealthBarBorderStyle"),
|
healthBar:SetBackdrop({ edgeFile = Gladdy:SMFetch("border", "petHealthBarBorderStyle"),
|
||||||
edgeSize = Gladdy.db.petHealthBarBorderSize })
|
edgeSize = Gladdy.db.petHealthBarBorderSize })
|
||||||
healthBar:SetBackdropBorderColor(Gladdy.db.petHealthBarBorderColor.r, Gladdy.db.petHealthBarBorderColor.g, Gladdy.db.petHealthBarBorderColor.b, Gladdy.db.petHealthBarBorderColor.a)
|
healthBar:SetBackdropBorderColor(Gladdy.db.petHealthBarBorderColor.r, Gladdy.db.petHealthBarBorderColor.g, Gladdy.db.petHealthBarBorderColor.b, Gladdy.db.petHealthBarBorderColor.a)
|
||||||
|
|
||||||
healthBar.hp:SetStatusBarTexture(Gladdy:SMFetch("statusbar", Gladdy.db.petHealthBarTexture, "petHealthBarTexture"))
|
healthBar.hp:SetStatusBarTexture(Gladdy:SMFetch("statusbar", "petHealthBarTexture"))
|
||||||
healthBar.hp:SetStatusBarColor(Gladdy.db.petHealthBarColor.r, Gladdy.db.petHealthBarColor.g, Gladdy.db.petHealthBarColor.b, Gladdy.db.petHealthBarColor.a)
|
healthBar.hp:SetStatusBarColor(Gladdy.db.petHealthBarColor.r, Gladdy.db.petHealthBarColor.g, Gladdy.db.petHealthBarColor.b, Gladdy.db.petHealthBarColor.a)
|
||||||
healthBar.hp:ClearAllPoints()
|
healthBar.hp:ClearAllPoints()
|
||||||
healthBar.hp:SetPoint("TOPLEFT", healthBar, "TOPLEFT", (Gladdy.db.petHealthBarBorderSize/Gladdy.db.statusbarBorderOffset), -(Gladdy.db.petHealthBarBorderSize/Gladdy.db.statusbarBorderOffset))
|
healthBar.hp:SetPoint("TOPLEFT", healthBar, "TOPLEFT", (Gladdy.db.petHealthBarBorderSize/Gladdy.db.statusbarBorderOffset), -(Gladdy.db.petHealthBarBorderSize/Gladdy.db.statusbarBorderOffset))
|
||||||
healthBar.hp:SetPoint("BOTTOMRIGHT", healthBar, "BOTTOMRIGHT", -(Gladdy.db.petHealthBarBorderSize/Gladdy.db.statusbarBorderOffset), (Gladdy.db.petHealthBarBorderSize/Gladdy.db.statusbarBorderOffset))
|
healthBar.hp:SetPoint("BOTTOMRIGHT", healthBar, "BOTTOMRIGHT", -(Gladdy.db.petHealthBarBorderSize/Gladdy.db.statusbarBorderOffset), (Gladdy.db.petHealthBarBorderSize/Gladdy.db.statusbarBorderOffset))
|
||||||
|
|
||||||
if (Gladdy.db.petHealthBarFontSize < 1) then
|
if (Gladdy.db.petHealthBarFontSize < 1) then
|
||||||
healthBar.nameText:SetFont(Gladdy:SMFetch("font", Gladdy.db.petHealthBarFont, "petHealthBarFont"), 1)
|
healthBar.nameText:SetFont(Gladdy:SMFetch("font", "petHealthBarFont"), 1)
|
||||||
healthBar.healthText:SetFont(Gladdy:SMFetch("font", Gladdy.db.petHealthBarFont, "petHealthBarFont"), 1)
|
healthBar.healthText:SetFont(Gladdy:SMFetch("font", "petHealthBarFont"), 1)
|
||||||
healthBar.nameText:Hide()
|
healthBar.nameText:Hide()
|
||||||
healthBar.healthText:Hide()
|
healthBar.healthText:Hide()
|
||||||
else
|
else
|
||||||
healthBar.nameText:SetFont(Gladdy:SMFetch("font", Gladdy.db.petHealthBarFont, "petHealthBarFont"), Gladdy.db.petHealthBarFontSize)
|
healthBar.nameText:SetFont(Gladdy:SMFetch("font", "petHealthBarFont"), Gladdy.db.petHealthBarFontSize)
|
||||||
healthBar.nameText:Show()
|
healthBar.nameText:Show()
|
||||||
healthBar.healthText:SetFont(Gladdy:SMFetch("font", Gladdy.db.petHealthBarFont, "petHealthBarFont"), Gladdy.db.petHealthBarFontSize)
|
healthBar.healthText:SetFont(Gladdy:SMFetch("font", "petHealthBarFont"), Gladdy.db.petHealthBarFontSize)
|
||||||
healthBar.healthText:Show()
|
healthBar.healthText:Show()
|
||||||
end
|
end
|
||||||
healthBar.nameText:SetTextColor(Gladdy.db.petHealthBarFontColor.r, Gladdy.db.petHealthBarFontColor.g, Gladdy.db.petHealthBarFontColor.b, Gladdy.db.petHealthBarFontColor.a)
|
healthBar.nameText:SetTextColor(Gladdy.db.petHealthBarFontColor.r, Gladdy.db.petHealthBarFontColor.g, Gladdy.db.petHealthBarFontColor.b, Gladdy.db.petHealthBarFontColor.a)
|
||||||
|
@ -38,24 +38,24 @@ function Powerbar:CreateFrame(unit)
|
|||||||
|
|
||||||
local powerBar = CreateFrame("Frame", nil, Gladdy.buttons[unit], BackdropTemplateMixin and "BackdropTemplate")
|
local powerBar = CreateFrame("Frame", nil, Gladdy.buttons[unit], BackdropTemplateMixin and "BackdropTemplate")
|
||||||
powerBar:EnableMouse(false)
|
powerBar:EnableMouse(false)
|
||||||
powerBar:SetBackdrop({ edgeFile = Gladdy:SMFetch("border", Gladdy.db.powerBarBorderStyle, "powerBarBorderStyle"),
|
powerBar:SetBackdrop({ edgeFile = Gladdy:SMFetch("border", "powerBarBorderStyle"),
|
||||||
edgeSize = Gladdy.db.powerBarBorderSize })
|
edgeSize = Gladdy.db.powerBarBorderSize })
|
||||||
powerBar:SetBackdropBorderColor(Gladdy.db.powerBarBorderColor.r, Gladdy.db.powerBarBorderColor.g, Gladdy.db.powerBarBorderColor.b, Gladdy.db.powerBarBorderColor.a)
|
powerBar:SetBackdropBorderColor(Gladdy.db.powerBarBorderColor.r, Gladdy.db.powerBarBorderColor.g, Gladdy.db.powerBarBorderColor.b, Gladdy.db.powerBarBorderColor.a)
|
||||||
powerBar:SetFrameLevel(1)
|
powerBar:SetFrameLevel(1)
|
||||||
|
|
||||||
powerBar.energy = CreateFrame("StatusBar", nil, powerBar)
|
powerBar.energy = CreateFrame("StatusBar", nil, powerBar)
|
||||||
powerBar.energy:SetStatusBarTexture(Gladdy:SMFetch("statusbar", Gladdy.db.powerBarTexture, "powerBarTexture"))
|
powerBar.energy:SetStatusBarTexture(Gladdy:SMFetch("statusbar", "powerBarTexture"))
|
||||||
powerBar.energy:SetMinMaxValues(0, 100)
|
powerBar.energy:SetMinMaxValues(0, 100)
|
||||||
powerBar.energy:SetFrameLevel(0)
|
powerBar.energy:SetFrameLevel(0)
|
||||||
|
|
||||||
powerBar.bg = powerBar.energy:CreateTexture(nil, "BACKGROUND")
|
powerBar.bg = powerBar.energy:CreateTexture(nil, "BACKGROUND")
|
||||||
powerBar.bg:SetTexture(Gladdy:SMFetch("statusbar", Gladdy.db.powerBarTexture, "powerBarTexture"))
|
powerBar.bg:SetTexture(Gladdy:SMFetch("statusbar", "powerBarTexture"))
|
||||||
powerBar.bg:ClearAllPoints()
|
powerBar.bg:ClearAllPoints()
|
||||||
powerBar.bg:SetAllPoints(powerBar.energy)
|
powerBar.bg:SetAllPoints(powerBar.energy)
|
||||||
powerBar.bg:SetVertexColor(Gladdy.db.powerBarBgColor.r, Gladdy.db.powerBarBgColor.g, Gladdy.db.powerBarBgColor.b, Gladdy.db.powerBarBgColor.a)
|
powerBar.bg:SetVertexColor(Gladdy.db.powerBarBgColor.r, Gladdy.db.powerBarBgColor.g, Gladdy.db.powerBarBgColor.b, Gladdy.db.powerBarBgColor.a)
|
||||||
|
|
||||||
powerBar.raceText = powerBar:CreateFontString(nil, "LOW")
|
powerBar.raceText = powerBar:CreateFontString(nil, "LOW")
|
||||||
powerBar.raceText:SetFont(Gladdy:SMFetch("font", Gladdy.db.powerBarFont, "powerBarFont"), Gladdy.db.powerBarFontSize)
|
powerBar.raceText:SetFont(Gladdy:SMFetch("font", "powerBarFont"), Gladdy.db.powerBarFontSize)
|
||||||
powerBar.raceText:SetTextColor(Gladdy.db.powerBarFontColor.r, Gladdy.db.powerBarFontColor.g, Gladdy.db.powerBarFontColor.b, Gladdy.db.powerBarFontColor.a)
|
powerBar.raceText:SetTextColor(Gladdy.db.powerBarFontColor.r, Gladdy.db.powerBarFontColor.g, Gladdy.db.powerBarFontColor.b, Gladdy.db.powerBarFontColor.a)
|
||||||
powerBar.raceText:SetShadowOffset(1, -1)
|
powerBar.raceText:SetShadowOffset(1, -1)
|
||||||
powerBar.raceText:SetShadowColor(0, 0, 0, 1)
|
powerBar.raceText:SetShadowColor(0, 0, 0, 1)
|
||||||
@ -63,7 +63,7 @@ function Powerbar:CreateFrame(unit)
|
|||||||
powerBar.raceText:SetPoint("LEFT", 5, 1)
|
powerBar.raceText:SetPoint("LEFT", 5, 1)
|
||||||
|
|
||||||
powerBar.powerText = powerBar:CreateFontString(nil, "LOW")
|
powerBar.powerText = powerBar:CreateFontString(nil, "LOW")
|
||||||
powerBar.powerText:SetFont(Gladdy:SMFetch("font", Gladdy.db.powerBarFont, "powerBarFont"), Gladdy.db.powerBarFontSize)
|
powerBar.powerText:SetFont(Gladdy:SMFetch("font", "powerBarFont"), Gladdy.db.powerBarFontSize)
|
||||||
powerBar.powerText:SetTextColor(Gladdy.db.powerBarFontColor.r, Gladdy.db.powerBarFontColor.g, Gladdy.db.powerBarFontColor.b, Gladdy.db.powerBarFontColor.a)
|
powerBar.powerText:SetTextColor(Gladdy.db.powerBarFontColor.r, Gladdy.db.powerBarFontColor.g, Gladdy.db.powerBarFontColor.b, Gladdy.db.powerBarFontColor.a)
|
||||||
powerBar.powerText:SetShadowOffset(1, -1)
|
powerBar.powerText:SetShadowOffset(1, -1)
|
||||||
powerBar.powerText:SetShadowColor(0, 0, 0, 1)
|
powerBar.powerText:SetShadowColor(0, 0, 0, 1)
|
||||||
@ -149,7 +149,7 @@ function Powerbar:UpdateFrame(unit)
|
|||||||
else
|
else
|
||||||
powerBar:Show()
|
powerBar:Show()
|
||||||
end
|
end
|
||||||
powerBar.bg:SetTexture(Gladdy:SMFetch("statusbar", Gladdy.db.powerBarTexture, "powerBarTexture"))
|
powerBar.bg:SetTexture(Gladdy:SMFetch("statusbar", "powerBarTexture"))
|
||||||
powerBar.bg:SetVertexColor(Gladdy.db.powerBarBgColor.r, Gladdy.db.powerBarBgColor.g, Gladdy.db.powerBarBgColor.b, Gladdy.db.powerBarBgColor.a)
|
powerBar.bg:SetVertexColor(Gladdy.db.powerBarBgColor.r, Gladdy.db.powerBarBgColor.g, Gladdy.db.powerBarBgColor.b, Gladdy.db.powerBarBgColor.a)
|
||||||
|
|
||||||
powerBar:SetWidth(healthBar:GetWidth())
|
powerBar:SetWidth(healthBar:GetWidth())
|
||||||
@ -158,18 +158,18 @@ function Powerbar:UpdateFrame(unit)
|
|||||||
powerBar:ClearAllPoints()
|
powerBar:ClearAllPoints()
|
||||||
powerBar:SetPoint("TOPLEFT", healthBar, "BOTTOMLEFT", 0, -1)
|
powerBar:SetPoint("TOPLEFT", healthBar, "BOTTOMLEFT", 0, -1)
|
||||||
|
|
||||||
powerBar:SetBackdrop({ edgeFile = Gladdy:SMFetch("border", Gladdy.db.powerBarBorderStyle, "powerBarBorderStyle"),
|
powerBar:SetBackdrop({ edgeFile = Gladdy:SMFetch("border", "powerBarBorderStyle"),
|
||||||
edgeSize = Gladdy.db.powerBarBorderSize })
|
edgeSize = Gladdy.db.powerBarBorderSize })
|
||||||
powerBar:SetBackdropBorderColor(Gladdy.db.powerBarBorderColor.r, Gladdy.db.powerBarBorderColor.g, Gladdy.db.powerBarBorderColor.b, Gladdy.db.powerBarBorderColor.a)
|
powerBar:SetBackdropBorderColor(Gladdy.db.powerBarBorderColor.r, Gladdy.db.powerBarBorderColor.g, Gladdy.db.powerBarBorderColor.b, Gladdy.db.powerBarBorderColor.a)
|
||||||
|
|
||||||
powerBar.energy:SetStatusBarTexture(Gladdy:SMFetch("statusbar", Gladdy.db.powerBarTexture, "powerBarTexture"))
|
powerBar.energy:SetStatusBarTexture(Gladdy:SMFetch("statusbar", "powerBarTexture"))
|
||||||
powerBar.energy:ClearAllPoints()
|
powerBar.energy:ClearAllPoints()
|
||||||
powerBar.energy:SetPoint("TOPLEFT", powerBar, "TOPLEFT", (Gladdy.db.powerBarBorderSize/Gladdy.db.statusbarBorderOffset), -(Gladdy.db.powerBarBorderSize/Gladdy.db.statusbarBorderOffset))
|
powerBar.energy:SetPoint("TOPLEFT", powerBar, "TOPLEFT", (Gladdy.db.powerBarBorderSize/Gladdy.db.statusbarBorderOffset), -(Gladdy.db.powerBarBorderSize/Gladdy.db.statusbarBorderOffset))
|
||||||
powerBar.energy:SetPoint("BOTTOMRIGHT", powerBar, "BOTTOMRIGHT", -(Gladdy.db.powerBarBorderSize/Gladdy.db.statusbarBorderOffset), (Gladdy.db.powerBarBorderSize/Gladdy.db.statusbarBorderOffset))
|
powerBar.energy:SetPoint("BOTTOMRIGHT", powerBar, "BOTTOMRIGHT", -(Gladdy.db.powerBarBorderSize/Gladdy.db.statusbarBorderOffset), (Gladdy.db.powerBarBorderSize/Gladdy.db.statusbarBorderOffset))
|
||||||
|
|
||||||
powerBar.raceText:SetFont(Gladdy:SMFetch("font", Gladdy.db.powerBarFont, "powerBarFont"), Gladdy.db.powerBarFontSize)
|
powerBar.raceText:SetFont(Gladdy:SMFetch("font", "powerBarFont"), Gladdy.db.powerBarFontSize)
|
||||||
powerBar.raceText:SetTextColor(Gladdy.db.powerBarFontColor.r, Gladdy.db.powerBarFontColor.g, Gladdy.db.powerBarFontColor.b, Gladdy.db.powerBarFontColor.a)
|
powerBar.raceText:SetTextColor(Gladdy.db.powerBarFontColor.r, Gladdy.db.powerBarFontColor.g, Gladdy.db.powerBarFontColor.b, Gladdy.db.powerBarFontColor.a)
|
||||||
powerBar.powerText:SetFont(Gladdy:SMFetch("font", Gladdy.db.powerBarFont, "powerBarFont"), Gladdy.db.powerBarFontSize)
|
powerBar.powerText:SetFont(Gladdy:SMFetch("font", "powerBarFont"), Gladdy.db.powerBarFontSize)
|
||||||
powerBar.powerText:SetTextColor(Gladdy.db.powerBarFontColor.r, Gladdy.db.powerBarFontColor.g, Gladdy.db.powerBarFontColor.b, Gladdy.db.powerBarFontColor.a)
|
powerBar.powerText:SetTextColor(Gladdy.db.powerBarFontColor.r, Gladdy.db.powerBarFontColor.g, Gladdy.db.powerBarFontColor.b, Gladdy.db.powerBarFontColor.a)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -44,19 +44,19 @@ local function iconTimer(self,elapsed)
|
|||||||
|
|
||||||
if timeLeft >= 60 then
|
if timeLeft >= 60 then
|
||||||
self.cooldownFont:SetTextColor(1, 1, 0)
|
self.cooldownFont:SetTextColor(1, 1, 0)
|
||||||
self.cooldownFont:SetFont(Gladdy:SMFetch("font", Gladdy.db.racialFont, "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)
|
||||||
self.cooldownFont:SetFont(Gladdy:SMFetch("font", Gladdy.db.racialFont, "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)
|
||||||
self.cooldownFont:SetFont(Gladdy:SMFetch("font", Gladdy.db.racialFont, "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)
|
||||||
self.cooldownFont:SetFont(Gladdy:SMFetch("font", Gladdy.db.racialFont, "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)
|
||||||
self.cooldownFont:SetFont(Gladdy:SMFetch("font", Gladdy.db.racialFont, "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)
|
||||||
end
|
end
|
||||||
@ -80,7 +80,7 @@ function Racial:CreateFrame(unit)
|
|||||||
racial.cooldownFrame:SetPoint("BOTTOMRIGHT", racial, "BOTTOMRIGHT")
|
racial.cooldownFrame:SetPoint("BOTTOMRIGHT", racial, "BOTTOMRIGHT")
|
||||||
|
|
||||||
racial.cooldownFont = racial.cooldownFrame:CreateFontString(nil, "OVERLAY")
|
racial.cooldownFont = racial.cooldownFrame:CreateFontString(nil, "OVERLAY")
|
||||||
racial.cooldownFont:SetFont(Gladdy:SMFetch("font", Gladdy.db.racialFont, "racialFont"), 20, "OUTLINE")
|
racial.cooldownFont:SetFont(Gladdy:SMFetch("font", "racialFont"), 20, "OUTLINE")
|
||||||
--trinket.cooldownFont:SetAllPoints(trinket.cooldown)
|
--trinket.cooldownFont:SetAllPoints(trinket.cooldown)
|
||||||
racial.cooldownFont:SetJustifyH("CENTER")
|
racial.cooldownFont:SetJustifyH("CENTER")
|
||||||
racial.cooldownFont:SetPoint("CENTER")
|
racial.cooldownFont:SetPoint("CENTER")
|
||||||
|
@ -269,7 +269,7 @@ function TotemPlates:UpdateFrameOnce()
|
|||||||
Gladdy.db.npTotemColors["totem" .. totemDataEntry.id].color.b,
|
Gladdy.db.npTotemColors["totem" .. totemDataEntry.id].color.b,
|
||||||
Gladdy.db.npTotemColors["totem" .. totemDataEntry.id].color.a)
|
Gladdy.db.npTotemColors["totem" .. totemDataEntry.id].color.a)
|
||||||
nameplate.gladdyTotemFrame.totemName:SetPoint("TOP", nameplate.gladdyTotemFrame, "BOTTOM", Gladdy.db.npTremorFontXOffset, Gladdy.db.npTremorFontYOffset)
|
nameplate.gladdyTotemFrame.totemName:SetPoint("TOP", nameplate.gladdyTotemFrame, "BOTTOM", Gladdy.db.npTremorFontXOffset, Gladdy.db.npTremorFontYOffset)
|
||||||
nameplate.gladdyTotemFrame.totemName:SetFont(Gladdy:SMFetch("font", Gladdy.db.npTremorFont, "npTremorFont"), Gladdy.db.npTremorFontSize, "OUTLINE")
|
nameplate.gladdyTotemFrame.totemName:SetFont(Gladdy:SMFetch("font", "npTremorFont"), Gladdy.db.npTremorFontSize, "OUTLINE")
|
||||||
nameplate.gladdyTotemFrame.totemName:SetText(Gladdy.db.npTotemColors["totem" .. totemDataEntry.id].customText or "")
|
nameplate.gladdyTotemFrame.totemName:SetText(Gladdy.db.npTotemColors["totem" .. totemDataEntry.id].customText or "")
|
||||||
self:SetTotemAlpha(nameplate.gladdyTotemFrame, k)
|
self:SetTotemAlpha(nameplate.gladdyTotemFrame, k)
|
||||||
|
|
||||||
@ -300,7 +300,7 @@ function TotemPlates:UpdateFrameOnce()
|
|||||||
gladdyTotemFrame:SetWidth(Gladdy.db.npTotemPlatesSize * Gladdy.db.npTotemPlatesWidthFactor)
|
gladdyTotemFrame:SetWidth(Gladdy.db.npTotemPlatesSize * Gladdy.db.npTotemPlatesWidthFactor)
|
||||||
gladdyTotemFrame:SetHeight(Gladdy.db.npTotemPlatesSize)
|
gladdyTotemFrame:SetHeight(Gladdy.db.npTotemPlatesSize)
|
||||||
gladdyTotemFrame.totemBorder:SetTexture(Gladdy.db.npTotemPlatesBorderStyle)
|
gladdyTotemFrame.totemBorder:SetTexture(Gladdy.db.npTotemPlatesBorderStyle)
|
||||||
gladdyTotemFrame.totemName:SetFont(Gladdy:SMFetch("font", Gladdy.db.npTremorFont, "npTremorFont"), Gladdy.db.npTremorFontSize, "OUTLINE")
|
gladdyTotemFrame.totemName:SetFont(Gladdy:SMFetch("font", "npTremorFont"), Gladdy.db.npTremorFontSize, "OUTLINE")
|
||||||
gladdyTotemFrame.totemName:SetPoint("TOP", gladdyTotemFrame, "BOTTOM", Gladdy.db.npTremorFontXOffset, Gladdy.db.npTremorFontYOffset)
|
gladdyTotemFrame.totemName:SetPoint("TOP", gladdyTotemFrame, "BOTTOM", Gladdy.db.npTremorFontXOffset, Gladdy.db.npTremorFontYOffset)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
@ -327,7 +327,7 @@ function TotemPlates:CreateTotemFrame(nameplate)
|
|||||||
nameplate.gladdyTotemFrame.totemBorder:SetPoint("BOTTOMRIGHT", nameplate.gladdyTotemFrame, "BOTTOMRIGHT")
|
nameplate.gladdyTotemFrame.totemBorder:SetPoint("BOTTOMRIGHT", nameplate.gladdyTotemFrame, "BOTTOMRIGHT")
|
||||||
nameplate.gladdyTotemFrame.totemBorder:SetTexture(Gladdy.db.npTotemPlatesBorderStyle)
|
nameplate.gladdyTotemFrame.totemBorder:SetTexture(Gladdy.db.npTotemPlatesBorderStyle)
|
||||||
nameplate.gladdyTotemFrame.totemName = nameplate.gladdyTotemFrame:CreateFontString(nil, "OVERLAY")
|
nameplate.gladdyTotemFrame.totemName = nameplate.gladdyTotemFrame:CreateFontString(nil, "OVERLAY")
|
||||||
nameplate.gladdyTotemFrame.totemName:SetFont(Gladdy:SMFetch("font", Gladdy.db.npTremorFont, "npTremorFont"), Gladdy.db.npTremorFontSize, "OUTLINE")
|
nameplate.gladdyTotemFrame.totemName:SetFont(Gladdy:SMFetch("font", "npTremorFont"), Gladdy.db.npTremorFontSize, "OUTLINE")
|
||||||
nameplate.gladdyTotemFrame.totemName:SetPoint("TOP", nameplate.gladdyTotemFrame, "BOTTOM", Gladdy.db.npTremorFontXOffset, Gladdy.db.npTremorFontYOffset)
|
nameplate.gladdyTotemFrame.totemName:SetPoint("TOP", nameplate.gladdyTotemFrame, "BOTTOM", Gladdy.db.npTremorFontXOffset, Gladdy.db.npTremorFontYOffset)
|
||||||
nameplate.gladdyTotemFrame.selectionHighlight = nameplate.gladdyTotemFrame:CreateTexture(nil, "OVERLAY")
|
nameplate.gladdyTotemFrame.selectionHighlight = nameplate.gladdyTotemFrame:CreateTexture(nil, "OVERLAY")
|
||||||
nameplate.gladdyTotemFrame.selectionHighlight:SetTexture("Interface/TargetingFrame/UI-TargetingFrame-BarFill")
|
nameplate.gladdyTotemFrame.selectionHighlight:SetTexture("Interface/TargetingFrame/UI-TargetingFrame-BarFill")
|
||||||
|
@ -40,19 +40,19 @@ local function iconTimer(self, elapsed)
|
|||||||
|
|
||||||
if timeLeft >= 60 then
|
if timeLeft >= 60 then
|
||||||
self.cooldownFont:SetTextColor(1, 1, 0)
|
self.cooldownFont:SetTextColor(1, 1, 0)
|
||||||
self.cooldownFont:SetFont(Gladdy:SMFetch("font", Gladdy.db.trinketFont, "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)
|
||||||
self.cooldownFont:SetFont(Gladdy:SMFetch("font", Gladdy.db.trinketFont, "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)
|
||||||
self.cooldownFont:SetFont(Gladdy:SMFetch("font", Gladdy.db.trinketFont, "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)
|
||||||
self.cooldownFont:SetFont(Gladdy:SMFetch("font", Gladdy.db.trinketFont, "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)
|
||||||
self.cooldownFont:SetFont(Gladdy:SMFetch("font", Gladdy.db.trinketFont, "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)
|
||||||
end
|
end
|
||||||
@ -76,7 +76,7 @@ function Trinket:CreateFrame(unit)
|
|||||||
trinket.cooldownFrame:SetPoint("BOTTOMRIGHT", trinket, "BOTTOMRIGHT")
|
trinket.cooldownFrame:SetPoint("BOTTOMRIGHT", trinket, "BOTTOMRIGHT")
|
||||||
|
|
||||||
trinket.cooldownFont = trinket.cooldownFrame:CreateFontString(nil, "OVERLAY")
|
trinket.cooldownFont = trinket.cooldownFrame:CreateFontString(nil, "OVERLAY")
|
||||||
trinket.cooldownFont:SetFont(Gladdy:SMFetch("font", Gladdy.db.trinketFont, "trinketFont"), 20, "OUTLINE")
|
trinket.cooldownFont:SetFont(Gladdy:SMFetch("font", "trinketFont"), 20, "OUTLINE")
|
||||||
--trinket.cooldownFont:SetAllPoints(trinket.cooldown)
|
--trinket.cooldownFont:SetAllPoints(trinket.cooldown)
|
||||||
trinket.cooldownFont:SetJustifyH("CENTER")
|
trinket.cooldownFont:SetJustifyH("CENTER")
|
||||||
trinket.cooldownFont:SetPoint("CENTER")
|
trinket.cooldownFont:SetPoint("CENTER")
|
||||||
|
Loading…
Reference in New Issue
Block a user