Skip to content

Commit

Permalink
- Add option to use Blizzard spell alerts. (#377)
Browse files Browse the repository at this point in the history
  • Loading branch information
StormFX committed Jul 13, 2024
1 parent fb101d9 commit 3462145
Show file tree
Hide file tree
Showing 3 changed files with 31 additions and 10 deletions.
8 changes: 6 additions & 2 deletions Core/Regions/SpellAlert.lua
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,9 @@ local function SkinFlipBook(Region, Button, Skin, xScale, yScale)
local Loop_Animation = Loop_Group.FlipAnim or GetFlipBook(Loop_Group:GetAnimations())
local Loop_Flipbook = Region.ProcLoopFlipbook

if Skin then
local Alert_Style = Core.db.profile.SpellAlert.Style

if Skin and (Alert_Style ~= "Blizzard") then
-- [ Alert Frame ]

-- Get the skin size relative to scaling.
Expand Down Expand Up @@ -315,9 +317,11 @@ local function UpdateSpellAlert(Button)
Region.__Skip_Start = (Alert_Setting == 2 and true) or nil

local Active_Skin = Region.__MSQ_Skin
local Skin_Changed = (not Active_Skin) or (Active_Skin ~= Region_Skin)
local Scale_Changed = Region.__MSQ_Scale ~= Button.__MSQ_Scale

-- Update the skin if the skin or scale has changed.
if (not Active_Skin) or (Active_Skin ~= Region_Skin) or (Region.__MSQ_Scale ~= Button.__MSQ_Scale) then
if (Skin_Changed or Scale_Changed) then
SkinFlipBook(Region, Button, Region_Skin, GetScale(Button))

-- Update the Start animation.
Expand Down
3 changes: 3 additions & 0 deletions Masque.lua
Original file line number Diff line number Diff line change
Expand Up @@ -219,6 +219,9 @@ function Masque:OnInitialize()
Reticle = true,
SpellAlert = 1,
},
SpellAlert = {
Style = "Masque Thin",
},
},
}

Expand Down
30 changes: 22 additions & 8 deletions Options/General.lua
Original file line number Diff line number Diff line change
Expand Up @@ -260,51 +260,65 @@ function Setup.General(self)
},
order = 2,
},
SpellAlertStyle = {
type = "select",
name = L["Spell Alert Style"],
desc = L["Select the spell alert style."]..Reload,
values = {
["Blizzard"] = L["Blizzard"],
["Masque Thin"] = L["Masque Thin"],
},
get = function(i) return Core.db.profile.SpellAlert.Style end,
set = function(i, v)
Core.db.profile.SpellAlert.Style = v
end,
order = 3,
},
SPC01 = {
type = "description",
name = " ",
order = 3,
order = 4,
},
Castbar = {
type = "toggle",
name = L["Cast Animations"],
desc = L["Enable cast animations on action buttons."],
order = 4,
order = 5,
},
SPC02 = {
type = "description",
name = " ",
order = 5,
order = 6,
},
Cooldown = {
type = "toggle",
name = L["Cooldown Animations"],
desc = L["Enable animations when action button cooldowns finish."],
order = 6,
order = 7,
hidden = true,
},
SPC03 = {
type = "description",
name = " ",
order = 7,
order = 8,
hidden = true,
},
Interrupt = {
type = "toggle",
name = L["Interrupt Animations"],
desc = L["Enable interrupt animations on action buttons."],
order = 8,
order = 9,
},
SPC04 = {
type = "description",
name = " ",
order = 9,
order = 10,
},
Reticle = {
type = "toggle",
name = L["Targeting Reticles"],
desc = L["Enable targeting reticles on action buttons."],
order = 10,
order = 11,
},
},
} or nil,
Expand Down

0 comments on commit 3462145

Please sign in to comment.