From 7f10e8d15c6095dac7f3d030ffa9a9d1c1353c41 Mon Sep 17 00:00:00 2001 From: Infus Date: Sun, 28 Mar 2021 19:16:13 +0200 Subject: [PATCH] Progress --- WeakAuras/AuraEnvironment.lua | 1 - WeakAuras/SubRegionTypes/Glow.lua | 38 ------------------------- WeakAurasTemplates/TriggerTemplates.lua | 6 ++-- 3 files changed, 4 insertions(+), 41 deletions(-) diff --git a/WeakAuras/AuraEnvironment.lua b/WeakAuras/AuraEnvironment.lua index cdca484f84..6d1d6330db 100644 --- a/WeakAuras/AuraEnvironment.lua +++ b/WeakAuras/AuraEnvironment.lua @@ -369,7 +369,6 @@ local FakeWeakAurasMixin = { UpdateGroupOrders = true, UpdateThumbnail = true, validate = true, - getDefaultGlow = true, }, blockedTables = { AuraWarnings = true, diff --git a/WeakAuras/SubRegionTypes/Glow.lua b/WeakAuras/SubRegionTypes/Glow.lua index 6ee7930851..cb2a2dd393 100644 --- a/WeakAuras/SubRegionTypes/Glow.lua +++ b/WeakAuras/SubRegionTypes/Glow.lua @@ -353,44 +353,6 @@ local function modify(parent, region, parentData, data, first) region:SetScript("OnSizeChanged", region.UpdateSize) end --- This is used by the templates to add glow -function WeakAuras.getDefaultGlow(regionType) - if regionType == "aurabar" then - return { - ["type"] = "subglow", - glow = false, - useGlowColor = false, - glowColor = {1, 1, 1, 1}, - glowType = "Pixel", - glowLines = 8, - glowFrequency = 0.25, - glowLength = 10, - glowThickness = 1, - glowScale = 1, - glowBorder = false, - glowXOffset = 0, - glowYOffset = 0, - glow_anchor = "bar" - } - elseif regionType == "icon" then - return { - ["type"] = "subglow", - glow = false, - useGlowColor = false, - glowColor = {1, 1, 1, 1}, - glowType = "buttonOverlay", - glowLines = 8, - glowFrequency = 0.25, - glowLength = 10, - glowThickness = 1, - glowScale = 1, - glowBorder = false, - glowXOffset = 0, - glowYOffset = 0, - } - end -end - local function supports(regionType) return regionType == "icon" or regionType == "aurabar" diff --git a/WeakAurasTemplates/TriggerTemplates.lua b/WeakAurasTemplates/TriggerTemplates.lua index c8a86f22ac..3aa2fcfc41 100644 --- a/WeakAurasTemplates/TriggerTemplates.lua +++ b/WeakAurasTemplates/TriggerTemplates.lua @@ -55,7 +55,7 @@ local function changes(property, regionType) }; end - -- TODO check that this works + -- TODO check that templates filtering condition changes work local defaults = TemplatePrivate.Private.GetDefaultsForRegion(regionType, "template") if defaults[property] == nil then return nil; @@ -501,7 +501,9 @@ local function subTypesFor(item, regionType) cd = 134377, cd2 = 134376, }; - local subglow = WeakAuras.getDefaultGlow(regionType) + -- TODO check that this code works + local subglow = TemplatePrivate.Private.GetDefaultsForSubRegion("glow", regionType, "template") + -- TODO this looks hacky local subglowindex = (regionType == "icon" or regionType == "aurabar") and 1 local data = {} local dataGlow = {