Implement fade and flash behavior for square indicators

This commit is contained in:
omicron committed 2023-07-28 14:15:50 +02:00
1 parent 877560cb58
commit e20887d46b
4 files changed
+298 -124

No files matched your search

+4 -4
View File
@@ -1,7 +1,7 @@
-- Copyright 2023 <omicron.me@protonmail.com>
--
-- This file is part of Omicron Frames
--
--
-- Omicron Frames is free software: you can redistribute it and/or modify it
-- under the terms of the GNU General Public License as published by the Free
-- Software Foundation, either version 3 of the License, or (at your option)
@@ -13,7 +13,7 @@
-- more details.
--
-- You should have received a copy of the GNU General Public License along with
-- Omicron Frames. If not, see <https://www.gnu.org/licenses/>.
-- Omicron Frames. If not, see <https://www.gnu.org/licenses/>.
local omi = select(2, ...)
local types = omi.GetModule("types")
---@class Trigger
@@ -92,7 +92,7 @@ function AuraTrigger:AddAura(aura)
return
end
self.count = self.count + 1
self:SetData({stacks=aura.applications})
self:SetData({ stacks = aura.applications, duration = aura.duration, expirationTime = aura.expirationTime })
self:SetState(self.count >= self.requiredCount, false)
end
@@ -100,7 +100,7 @@ end
---@param before UnitAuraInfo
---@param after UnitAuraInfo
function AuraTrigger:UpdateAura(before, after)
self:SetData({stacks=after.applications})
self:SetData({ stacks = after.applications, duration = after.duration, expirationTime = after.expirationTime })
if self.active then
self.indicator:Update(self.data)
end