classIcon add enable option
This commit is contained in:
parent
5766484f92
commit
91f7fcb998
@ -5,6 +5,7 @@ local CreateFrame = CreateFrame
|
|||||||
local GetSpellInfo = GetSpellInfo
|
local GetSpellInfo = GetSpellInfo
|
||||||
local L = Gladdy.L
|
local L = Gladdy.L
|
||||||
local Classicon = Gladdy:NewModule("Class Icon", 81, {
|
local Classicon = Gladdy:NewModule("Class Icon", 81, {
|
||||||
|
classIconEnabled = true,
|
||||||
classIconSize = 60 + 20 + 1,
|
classIconSize = 60 + 20 + 1,
|
||||||
classIconWidthFactor = 0.9,
|
classIconWidthFactor = 0.9,
|
||||||
classIconBorderStyle = "Interface\\AddOns\\Gladdy\\Images\\Border_rounded_blp",
|
classIconBorderStyle = "Interface\\AddOns\\Gladdy\\Images\\Border_rounded_blp",
|
||||||
@ -129,6 +130,11 @@ function Classicon:UpdateFrame(unit)
|
|||||||
|
|
||||||
classIcon.texture.overlay:SetTexture(Gladdy.db.classIconBorderStyle)
|
classIcon.texture.overlay:SetTexture(Gladdy.db.classIconBorderStyle)
|
||||||
classIcon.texture.overlay:SetVertexColor(Gladdy.db.classIconBorderColor.r, Gladdy.db.classIconBorderColor.g, Gladdy.db.classIconBorderColor.b, Gladdy.db.classIconBorderColor.a)
|
classIcon.texture.overlay:SetVertexColor(Gladdy.db.classIconBorderColor.r, Gladdy.db.classIconBorderColor.g, Gladdy.db.classIconBorderColor.b, Gladdy.db.classIconBorderColor.a)
|
||||||
|
if Gladdy.db.classIconEnabled then
|
||||||
|
classIcon:Show()
|
||||||
|
else
|
||||||
|
classIcon:Hide()
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
function Classicon:ENEMY_SPOTTED(unit)
|
function Classicon:ENEMY_SPOTTED(unit)
|
||||||
@ -170,11 +176,16 @@ function Classicon:GetOptions()
|
|||||||
name = L["Class Icon"],
|
name = L["Class Icon"],
|
||||||
order = 2,
|
order = 2,
|
||||||
},
|
},
|
||||||
|
classIconEnabled = Gladdy:option({
|
||||||
|
type = "toggle",
|
||||||
|
name = L["Class Icon Enabled"],
|
||||||
|
order = 3,
|
||||||
|
}),
|
||||||
classIconSpecIcon = {
|
classIconSpecIcon = {
|
||||||
type = "toggle",
|
type = "toggle",
|
||||||
name = L["Show Spec Icon"],
|
name = L["Show Spec Icon"],
|
||||||
desc = L["Shows Spec Icon once spec is detected"],
|
desc = L["Shows Spec Icon once spec is detected"],
|
||||||
order = 3,
|
order = 4,
|
||||||
get = function() return Gladdy.db.classIconSpecIcon end,
|
get = function() return Gladdy.db.classIconSpecIcon end,
|
||||||
set = function(_, value)
|
set = function(_, value)
|
||||||
Gladdy.db.classIconSpecIcon = value
|
Gladdy.db.classIconSpecIcon = value
|
||||||
@ -208,9 +219,9 @@ function Classicon:GetOptions()
|
|||||||
classIconSize = Gladdy:option({
|
classIconSize = Gladdy:option({
|
||||||
type = "range",
|
type = "range",
|
||||||
name = L["Icon size"],
|
name = L["Icon size"],
|
||||||
min = 1,
|
min = 3,
|
||||||
max = 100,
|
max = 100,
|
||||||
step = 1,
|
step = .1,
|
||||||
order = 3,
|
order = 3,
|
||||||
width = "full",
|
width = "full",
|
||||||
}),
|
}),
|
||||||
|
Loading…
Reference in New Issue
Block a user