Skip to content

Commit

Permalink
Rework aura type option for auras
Browse files Browse the repository at this point in the history
  • Loading branch information
ls- committed Oct 21, 2022
1 parent 2a58758 commit 5842d07
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 6 deletions.
4 changes: 2 additions & 2 deletions ls_UI/core/defaults.lua
Original file line number Diff line number Diff line change
Expand Up @@ -2475,9 +2475,9 @@ D.profile = {
},
},
type = {
enabled = false,
size = 12,
position = "TOPLEFT",
debuff_type = false,
},
point = {"TOPRIGHT", "UIParent", "TOPRIGHT", -250, -4},
},
Expand Down Expand Up @@ -2506,9 +2506,9 @@ D.profile = {
},
},
type = {
enabled = true,
size = 12,
position = "TOPLEFT",
debuff_type = false,
},
point = {"TOPRIGHT", "UIParent", "TOPRIGHT", -250, -114},
},
Expand Down
14 changes: 14 additions & 0 deletions ls_UI/core/modernize.lua
Original file line number Diff line number Diff line change
Expand Up @@ -662,6 +662,20 @@ function P:Modernize(data, name, key)
end
end

if data.auras then
if data.auras.HELPFUL then
if data.auras.HELPFUL.type then
data.auras.HELPFUL.type.debuff_type = nil
end
end

if data.auras.HARMFUL then
if data.auras.HARMFUL.type then
data.auras.HARMFUL.type.debuff_type = nil
end
end
end

if data.blizzard then
data.blizzard.castbar = nil
data.blizzard.objective_tracker = nil
Expand Down
4 changes: 2 additions & 2 deletions ls_UI/modules/auras/auras.lua
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ local function updateAura(button, index)
button.Border:SetVertexColor(E:GetRGB(C.db.global.colors.debuff[debuffType] or C.db.global.colors.debuff.None))

if debuffType and button.showDebuffType then
button.AuraType:SetTexCoord(unpack(M.textures.aura_icons[debuffType] or M.textures.aura_icons["Debuff"]))
button.AuraType:SetTexCoord(unpack(M.textures.aura_icons[debuffType] or M.textures.aura_icons.Debuff))
button.AuraType:Show()
else
button.AuraType:Hide()
Expand Down Expand Up @@ -143,7 +143,7 @@ local function button_UpdateAuraTypeIcon(self)
self.AuraType:SetPoint(config.position, 0, 0)
self.AuraType:SetSize(config.size, config.size)

self.showDebuffType = self._parent._config.type.debuff_type
self.showDebuffType = self._parent._config.type.enabled
end

local function button_UpdateCountFont(self)
Expand Down
4 changes: 2 additions & 2 deletions ls_UI_Options/auras.lua
Original file line number Diff line number Diff line change
Expand Up @@ -203,10 +203,10 @@ local function getAuraOptions(order, name, filter)
end
end,
args = {
debuff_type = {
enabled = {
order = reset(2),
type = "toggle",
name = L["DEBUFF_TYPE"],
name = L["SHOW"],
},
size = {
order = inc(2),
Expand Down

0 comments on commit 5842d07

Please sign in to comment.