From efa2dae58a51fd2a76c0d1dc20e9339d28f69d13 Mon Sep 17 00:00:00 2001 From: NoM0Re Date: Fri, 17 Jan 2025 15:35:11 +0100 Subject: [PATCH] from retail --- WeakAuras/AuraEnvironment.lua | 1 - WeakAuras/Prototypes.lua | 40 +++++++++++++++++++ WeakAuras/RegionTypes/AuraBar.lua | 12 +++--- WeakAuras/RegionTypes/DynamicGroup.lua | 6 +-- WeakAuras/RegionTypes/Group.lua | 6 +-- WeakAuras/RegionTypes/Icon.lua | 12 +++--- WeakAuras/RegionTypes/Model.lua | 10 ++--- WeakAuras/RegionTypes/ProgressTexture.lua | 12 +++--- WeakAuras/RegionTypes/RegionPrototype.lua | 22 +++++----- WeakAuras/RegionTypes/StopMotion.lua | 6 +-- WeakAuras/RegionTypes/Text.lua | 12 +++--- WeakAuras/RegionTypes/Texture.lua | 10 ++--- WeakAuras/WeakAuras.lua | 4 +- WeakAurasOptions/CommonOptions.lua | 28 +++++++++++-- WeakAurasOptions/RegionOptions/AuraBar.lua | 2 +- .../RegionOptions/ProgressTexture.lua | 2 +- 16 files changed, 122 insertions(+), 63 deletions(-) diff --git a/WeakAuras/AuraEnvironment.lua b/WeakAuras/AuraEnvironment.lua index 2772dd6..dd90435 100644 --- a/WeakAuras/AuraEnvironment.lua +++ b/WeakAuras/AuraEnvironment.lua @@ -435,7 +435,6 @@ local FakeWeakAurasMixin = { }, blockedTables = { ModelPaths = true, - regionPrototype = true, RealTimeProfilingWindow = true, -- Note these shouldn't exist in the WeakAuras namespace, but moving them takes a bit of effort, -- so for now just block them and clean them up later diff --git a/WeakAuras/Prototypes.lua b/WeakAuras/Prototypes.lua index 8408ad7..64e4e3d 100644 --- a/WeakAuras/Prototypes.lua +++ b/WeakAuras/Prototypes.lua @@ -1383,6 +1383,9 @@ Private.event_prototypes = { AddUnitEventForEvents(result, unit, "UNIT_NAME_UPDATE") AddUnitEventForEvents(result, unit, "UNIT_FLAGS") AddUnitEventForEvents(result, unit, "PLAYER_FLAGS_CHANGED") + if trigger.use_inRange then + AddUnitEventForEvents(result, unit, "UNIT_IN_RANGE_UPDATE") + end return result; end, internal_events = function(trigger) @@ -1548,6 +1551,16 @@ Private.event_prototypes = { end, init = "UnitIsConnected(unit)" }, + { + name = "inRange", + display = L["In Range"], + type = "toggle", + width = WeakAuras.doubleWidth, + enable = function(trigger) + return trigger.unit == "group" or trigger.unit == "raid" or trigger.unit == "party" + end, + init = "UnitInRange(unit)" + }, { name = "hostility", display = L["Hostility"], @@ -1790,6 +1803,9 @@ Private.event_prototypes = { if trigger.use_ignoreDead or trigger.use_ignoreDisconnected then AddUnitEventForEvents(result, unit, "UNIT_FLAGS") end + if trigger.use_inRange then + AddUnitEventForEvents(result, unit, "UNIT_IN_RANGE_UPDATE") + end return result end, internal_events = function(trigger) @@ -2049,6 +2065,16 @@ Private.event_prototypes = { end, init = "UnitIsConnected(unit)" }, + { + name = "inRange", + display = L["In Range"], + type = "toggle", + width = WeakAuras.doubleWidth, + enable = function(trigger) + return trigger.unit == "group" or trigger.unit == "raid" or trigger.unit == "party" + end, + init = "UnitInRange(unit)" + }, { name = "nameplateType", display = L["Nameplate Type"], @@ -2099,6 +2125,9 @@ Private.event_prototypes = { end tinsert(result.events, "FRAME_UPDATE") end + if trigger.use_inRange then + AddUnitEventForEvents(result, unit, "UNIT_IN_RANGE_UPDATE") + end return result; end, internal_events = function(trigger) @@ -2389,6 +2418,16 @@ Private.event_prototypes = { end, init = "UnitIsConnected(unit)" }, + { + name = "inRange", + display = L["In Range"], + type = "toggle", + width = WeakAuras.doubleWidth, + enable = function(trigger) + return trigger.unit == "group" or trigger.unit == "raid" or trigger.unit == "party" + end, + init = "UnitInRange(unit)" + }, { name = "nameplateType", display = L["Nameplate Type"], @@ -6558,6 +6597,7 @@ Private.event_prototypes = { if trigger.use_instance_difficulty ~= nil or trigger.use_instance_size ~= nil + or trigger.use_pvpflagged ~= nil then tinsert(events, "WA_DELAYED_PLAYER_ENTERING_WORLD") end diff --git a/WeakAuras/RegionTypes/AuraBar.lua b/WeakAuras/RegionTypes/AuraBar.lua index 1e10b83..6a240bc 100644 --- a/WeakAuras/RegionTypes/AuraBar.lua +++ b/WeakAuras/RegionTypes/AuraBar.lua @@ -38,8 +38,8 @@ local default = { zoom = 0 }; -WeakAuras.regionPrototype.AddAdjustedDurationToDefault(default); -WeakAuras.regionPrototype.AddAlphaToDefault(default); +Private.regionPrototype.AddAdjustedDurationToDefault(default); +Private.regionPrototype.AddAlphaToDefault(default); local screenWidth, screenHeight = math.ceil(GetScreenWidth() / 20) * 20, math.ceil(GetScreenHeight() / 20) * 20; @@ -132,7 +132,7 @@ local properties = { }, }; -WeakAuras.regionPrototype.AddProperties(properties, default); +Private.regionPrototype.AddProperties(properties, default); local function GetProperties(data) local overlayInfo = Private.GetOverlayInfo(data); @@ -1051,7 +1051,7 @@ local function create(parent) end end - WeakAuras.regionPrototype.create(region); + Private.regionPrototype.create(region); for k, f in pairs(funcs) do region[k] = f @@ -1075,7 +1075,7 @@ local function modify(parent, region, data) region.text = nil region.stacks = nil - WeakAuras.regionPrototype.modify(parent, region, data); + Private.regionPrototype.modify(parent, region, data); -- Localize local bar, iconFrame, icon = region.bar, region.iconFrame, region.icon; @@ -1355,7 +1355,7 @@ local function modify(parent, region, data) --- Update internal bar alignment region.bar:Update(); - WeakAuras.regionPrototype.modifyFinish(parent, region, data); + Private.regionPrototype.modifyFinish(parent, region, data); end local function validate(data) diff --git a/WeakAuras/RegionTypes/DynamicGroup.lua b/WeakAuras/RegionTypes/DynamicGroup.lua index f3a3e1b..7451252 100644 --- a/WeakAuras/RegionTypes/DynamicGroup.lua +++ b/WeakAuras/RegionTypes/DynamicGroup.lua @@ -119,7 +119,7 @@ local function create(parent) region.selfPoint = "TOPLEFT" region.controlPoints = CreateObjectPool(createControlPoint, releaseControlPoint) region.controlPoints.parent = region - WeakAuras.regionPrototype.create(region) + Private.regionPrototype.create(region) region.suspended = 0 local oldSetFrameLevel = region.SetFrameLevel @@ -1041,7 +1041,7 @@ end local function modify(parent, region, data) Private.FixGroupChildrenOrderForGroup(data) region:SetScale(data.scale and data.scale > 0 and data.scale <= 10 and data.scale or 1) - WeakAuras.regionPrototype.modify(parent, region, data) + Private.regionPrototype.modify(parent, region, data) if data.border and not data.useAnchorPerUnit then local background = region.background @@ -1560,7 +1560,7 @@ local function modify(parent, region, data) region:ReloadControlledChildren() - WeakAuras.regionPrototype.modifyFinish(parent, region, data) + Private.regionPrototype.modifyFinish(parent, region, data) end WeakAuras.RegisterRegionType("dynamicgroup", create, modify, default) diff --git a/WeakAuras/RegionTypes/Group.lua b/WeakAuras/RegionTypes/Group.lua index 1ed3702..eab0d7c 100644 --- a/WeakAuras/RegionTypes/Group.lua +++ b/WeakAuras/RegionTypes/Group.lua @@ -35,7 +35,7 @@ local function create(parent) local border = CreateFrame("Frame", nil, region); region.border = border; - WeakAuras.regionPrototype.create(region); + Private.regionPrototype.create(region); local oldSetFrameLevel = region.SetFrameLevel region.SetFrameLevel = function(self, level) @@ -90,7 +90,7 @@ local function modify(parent, region, data) else data.selfPoint = "CENTER"; end - WeakAuras.regionPrototype.modify(parent, region, data); + Private.regionPrototype.modify(parent, region, data); -- Localize local border = region.border; @@ -179,7 +179,7 @@ local function modify(parent, region, data) region.border:Hide() end - WeakAuras.regionPrototype.modifyFinish(parent, region, data); + Private.regionPrototype.modifyFinish(parent, region, data); end -- Register new region type with WeakAuras diff --git a/WeakAuras/RegionTypes/Icon.lua b/WeakAuras/RegionTypes/Icon.lua index c2e23f5..78b4bf3 100644 --- a/WeakAuras/RegionTypes/Icon.lua +++ b/WeakAuras/RegionTypes/Icon.lua @@ -35,7 +35,7 @@ local default = { cooldownEdge = false }; -WeakAuras.regionPrototype.AddAlphaToDefault(default); +Private.regionPrototype.AddAlphaToDefault(default); local screenWidth, screenHeight = math.ceil(GetScreenWidth() / 20) * 20, math.ceil(GetScreenHeight() / 20) * 20; @@ -101,7 +101,7 @@ local properties = { } }; -WeakAuras.regionPrototype.AddProperties(properties, default); +Private.regionPrototype.AddProperties(properties, default); local function GetProperties(data) local result = CopyTable(properties) @@ -140,7 +140,7 @@ end local function AnchorSubRegion(self, subRegion, anchorType, selfPoint, anchorPoint, anchorXOffset, anchorYOffset) if anchorType == "area" then - WeakAuras.regionPrototype.AnchorSubRegion(selfPoint == "region" and self or self.icon, subRegion, anchorType, selfPoint, anchorPoint, anchorXOffset, anchorYOffset) + Private.regionPrototype.AnchorSubRegion(selfPoint == "region" and self or self.icon, subRegion, anchorType, selfPoint, anchorPoint, anchorXOffset, anchorYOffset) else subRegion:ClearAllPoints() anchorPoint = anchorPoint or "CENTER" @@ -335,7 +335,7 @@ local function create(parent, data) end end - WeakAuras.regionPrototype.create(region); + Private.regionPrototype.create(region); region.AnchorSubRegion = AnchorSubRegion @@ -347,7 +347,7 @@ local function modify(parent, region, data) region.stacks = nil region.text2 = nil - WeakAuras.regionPrototype.modify(parent, region, data); + Private.regionPrototype.modify(parent, region, data); local button, icon, cooldown = region.button, region.icon, region.cooldown; @@ -674,7 +674,7 @@ local function modify(parent, region, data) end end - WeakAuras.regionPrototype.modifyFinish(parent, region, data); + Private.regionPrototype.modifyFinish(parent, region, data); --- WORKAROUND -- This fixes a issue with barmodels not appearing on icons if the diff --git a/WeakAuras/RegionTypes/Model.lua b/WeakAuras/RegionTypes/Model.lua index b543eac..b476f09 100644 --- a/WeakAuras/RegionTypes/Model.lua +++ b/WeakAuras/RegionTypes/Model.lua @@ -56,7 +56,7 @@ local properties = { }, } -WeakAuras.regionPrototype.AddProperties(properties, default); +Private.regionPrototype.AddProperties(properties, default); local function GetProperties(data) return properties; @@ -79,13 +79,13 @@ local function create(parent) local border = CreateFrame("Frame", nil, region); region.border = border; - WeakAuras.regionPrototype.create(region); + Private.regionPrototype.create(region); for k, v in pairs (regionFunctions) do region[k] = v end - region.AnchorSubRegion = WeakAuras.regionPrototype.AnchorSubRegion + region.AnchorSubRegion = Private.regionPrototype.AnchorSubRegion -- Return complete region return region; @@ -175,7 +175,7 @@ end -- Modify a given region/display local function modify(parent, region, data) - WeakAuras.regionPrototype.modify(parent, region, data); + Private.regionPrototype.modify(parent, region, data); -- Localize local border = region.border; @@ -273,7 +273,7 @@ local function modify(parent, region, data) end end - WeakAuras.regionPrototype.modifyFinish(parent, region, data); + Private.regionPrototype.modifyFinish(parent, region, data); end -- Work around for movies and world map hiding all models diff --git a/WeakAuras/RegionTypes/ProgressTexture.lua b/WeakAuras/RegionTypes/ProgressTexture.lua index 060de36..4feea79 100644 --- a/WeakAuras/RegionTypes/ProgressTexture.lua +++ b/WeakAuras/RegionTypes/ProgressTexture.lua @@ -113,9 +113,9 @@ local default = { slantMode = "INSIDE" }; -WeakAuras.regionPrototype.AddAlphaToDefault(default); +Private.regionPrototype.AddAlphaToDefault(default); -WeakAuras.regionPrototype.AddAdjustedDurationToDefault(default); +Private.regionPrototype.AddAdjustedDurationToDefault(default); local screenWidth, screenHeight = math.ceil(GetScreenWidth() / 20) * 20, math.ceil(GetScreenHeight() / 20) * 20; @@ -176,7 +176,7 @@ local properties = { } } -WeakAuras.regionPrototype.AddProperties(properties, default); +Private.regionPrototype.AddProperties(properties, default); local function GetProperties(data) local overlayInfo = Private.GetOverlayInfo(data); @@ -462,7 +462,7 @@ local function create(parent) region.duration = 0; region.expirationTime = math.huge; - WeakAuras.regionPrototype.create(region); + Private.regionPrototype.create(region); return region; end @@ -474,7 +474,7 @@ local function TimerTick(self) end local function modify(parent, region, data) - WeakAuras.regionPrototype.modify(parent, region, data); + Private.regionPrototype.modify(parent, region, data); local background, foreground = region.background, region.foreground; local foregroundSpinner, backgroundSpinner = region.foregroundSpinner, region.backgroundSpinner; @@ -1029,7 +1029,7 @@ local function modify(parent, region, data) end end - WeakAuras.regionPrototype.modifyFinish(parent, region, data); + Private.regionPrototype.modifyFinish(parent, region, data); end local function validate(data) diff --git a/WeakAuras/RegionTypes/RegionPrototype.lua b/WeakAuras/RegionTypes/RegionPrototype.lua index b180cf0..5fbd1f5 100644 --- a/WeakAuras/RegionTypes/RegionPrototype.lua +++ b/WeakAuras/RegionTypes/RegionPrototype.lua @@ -4,21 +4,21 @@ local AddonName, Private = ... local WeakAuras = WeakAuras; local L = WeakAuras.L; -WeakAuras.regionPrototype = {}; +Private.regionPrototype = {}; -- Alpha -function WeakAuras.regionPrototype.AddAlphaToDefault(default) +function Private.regionPrototype.AddAlphaToDefault(default) default.alpha = 1.0; end -- Adjusted Duration -function WeakAuras.regionPrototype.AddAdjustedDurationToDefault(default) +function Private.regionPrototype.AddAdjustedDurationToDefault(default) default.useAdjustededMax = false; default.useAdjustededMin = false; end -function WeakAuras.regionPrototype.AddAdjustedDurationOptions(options, data, order) +function Private.regionPrototype.AddAdjustedDurationOptions(options, data, order) options.useAdjustededMin = { type = "toggle", width = WeakAuras.normalWidth, @@ -100,7 +100,7 @@ function Private.GetAnchorsForData(parentData, type) end -- Sound / Chat Message / Custom Code -function WeakAuras.regionPrototype.AddProperties(properties, defaultsForRegion) +function Private.regionPrototype.AddProperties(properties, defaultsForRegion) properties["sound"] = { display = L["Sound"], action = "SoundPlay", @@ -452,9 +452,9 @@ local function AnchorSubRegion(self, subRegion, anchorType, selfPoint, anchorPoi end end -WeakAuras.regionPrototype.AnchorSubRegion = AnchorSubRegion +Private.regionPrototype.AnchorSubRegion = AnchorSubRegion -function WeakAuras.regionPrototype.create(region) +function Private.regionPrototype.create(region) local defaultsForRegion = Private.regionTypes[region.regionType] and Private.regionTypes[region.regionType].default; region.SoundPlay = SoundPlay; region.SoundRepeatStop = SoundRepeatStop; @@ -500,7 +500,7 @@ end -- SetDurationInfo -function WeakAuras.regionPrototype.modify(parent, region, data) +function Private.regionPrototype.modify(parent, region, data) region.state = nil region.states = nil region.subRegionEvents:ClearSubscribers() @@ -587,7 +587,7 @@ function WeakAuras.regionPrototype.modify(parent, region, data) end, true) end -function WeakAuras.regionPrototype.modifyFinish(parent, region, data) +function Private.regionPrototype.modifyFinish(parent, region, data) -- Sync subRegions if region.subRegions then for index, subRegion in pairs(region.subRegions) do @@ -674,7 +674,7 @@ local function TimerTickForSetDuration(self) self:SetTime(max - adjustMin, self.expirationTime - adjustMin, self.inverse); end -function WeakAuras.regionPrototype.AddSetDurationInfo(region) +function Private.regionPrototype.AddSetDurationInfo(region) if (region.SetValue and region.SetTime) then region.generatedSetDurationInfo = true; @@ -704,7 +704,7 @@ function WeakAuras.regionPrototype.AddSetDurationInfo(region) end -- Expand/Collapse function -function WeakAuras.regionPrototype.AddExpandFunction(data, region, cloneId, parent, parentRegionType) +function Private.regionPrototype.AddExpandFunction(data, region, cloneId, parent, parentRegionType) local uid = data.uid local id = data.id local inDynamicGroup = parentRegionType == "dynamicgroup"; diff --git a/WeakAuras/RegionTypes/StopMotion.lua b/WeakAuras/RegionTypes/StopMotion.lua index 07bfb2a..575b738 100644 --- a/WeakAuras/RegionTypes/StopMotion.lua +++ b/WeakAuras/RegionTypes/StopMotion.lua @@ -85,7 +85,7 @@ local properties = { }, } -WeakAuras.regionPrototype.AddProperties(properties, default); +Private.regionPrototype.AddProperties(properties, default); local function create(parent) local frame = CreateFrame("Frame", nil, UIParent); @@ -102,7 +102,7 @@ local function create(parent) frame.foreground = foreground; foreground:SetAllPoints(frame); - WeakAuras.regionPrototype.create(frame); + Private.regionPrototype.create(frame); return frame; end @@ -151,7 +151,7 @@ local function SetFrameViaFrames(self, texture, frame) end local function modify(parent, region, data) - WeakAuras.regionPrototype.modify(parent, region, data); + Private.regionPrototype.modify(parent, region, data); region.foreground = region.foreground or {} region.background = region.background or {} local pattern = "%.x(%d+)y(%d+)f(%d+)%.[tb][gl][ap]" diff --git a/WeakAuras/RegionTypes/Text.lua b/WeakAuras/RegionTypes/Text.lua index 7270f61..d1b3f5d 100644 --- a/WeakAuras/RegionTypes/Text.lua +++ b/WeakAuras/RegionTypes/Text.lua @@ -52,7 +52,7 @@ local properties = { }, } -WeakAuras.regionPrototype.AddProperties(properties, default); +Private.regionPrototype.AddProperties(properties, default); local function GetProperties(data) return properties; @@ -71,13 +71,13 @@ local function create(parent) region.duration = 0; region.expirationTime = math.huge; - WeakAuras.regionPrototype.create(region); + Private.regionPrototype.create(region); return region; end local function modify(parent, region, data) - WeakAuras.regionPrototype.modify(parent, region, data); + Private.regionPrototype.modify(parent, region, data); local text = region.text; local fontPath = SharedMedia:Fetch("font", data.font); @@ -334,7 +334,7 @@ local function modify(parent, region, data) region:ConfigureTextUpdate() region:ConfigureSubscribers() - WeakAuras.regionPrototype.modifyFinish(parent, region, data); + Private.regionPrototype.modifyFinish(parent, region, data); end local function validate(data) @@ -346,7 +346,7 @@ WeakAuras.RegisterRegionType("text", create, modify, default, GetProperties, val -- Fallback region type local function fallbackmodify(parent, region, data) - WeakAuras.regionPrototype.modify(parent, region, data); + Private.regionPrototype.modify(parent, region, data); local text = region.text; text:SetFont(STANDARD_TEXT_FONT, data.fontSize < 33 and data.fontSize or 33, data.outline and "OUTLINE" or nil); @@ -363,7 +363,7 @@ local function fallbackmodify(parent, region, data) region.Update = function() end - WeakAuras.regionPrototype.modifyFinish(parent, region, data); + Private.regionPrototype.modifyFinish(parent, region, data); end WeakAuras.RegisterRegionType("fallback", create, fallbackmodify, default); diff --git a/WeakAuras/RegionTypes/Texture.lua b/WeakAuras/RegionTypes/Texture.lua index d4ffd3b..1736793 100644 --- a/WeakAuras/RegionTypes/Texture.lua +++ b/WeakAuras/RegionTypes/Texture.lua @@ -22,7 +22,7 @@ local default = { frameStrata = 1 }; -WeakAuras.regionPrototype.AddAlphaToDefault(default); +Private.regionPrototype.AddAlphaToDefault(default); local screenWidth, screenHeight = math.ceil(GetScreenWidth() / 20) * 20, math.ceil(GetScreenHeight() / 20) * 20; @@ -62,7 +62,7 @@ local properties = { } } -WeakAuras.regionPrototype.AddProperties(properties, default); +Private.regionPrototype.AddProperties(properties, default); local function create(parent) local region = CreateFrame("Frame", nil, UIParent); @@ -75,13 +75,13 @@ local function create(parent) region.texture = texture; texture:SetAllPoints(region); - WeakAuras.regionPrototype.create(region); + Private.regionPrototype.create(region); return region; end local function modify(parent, region, data) - WeakAuras.regionPrototype.modify(parent, region, data); + Private.regionPrototype.modify(parent, region, data); region.texture:SetTexture(data.texture); region.texture:SetDesaturated(data.desaturate) region:SetWidth(data.width); @@ -230,7 +230,7 @@ local function modify(parent, region, data) region.GetRotation = nil; end - WeakAuras.regionPrototype.modifyFinish(parent, region, data); + Private.regionPrototype.modifyFinish(parent, region, data); end local function validate(data) diff --git a/WeakAuras/WeakAuras.lua b/WeakAuras/WeakAuras.lua index b51ebca..22e0ff0 100644 --- a/WeakAuras/WeakAuras.lua +++ b/WeakAuras/WeakAuras.lua @@ -2873,8 +2873,8 @@ function Private.SetRegion(data, cloneId) local anim_cancelled = loginFinished and Private.CancelAnimation(region, true, true, true, true, true, true); regionTypes[regionType].modify(parent, region, data); - WeakAuras.regionPrototype.AddSetDurationInfo(region); - WeakAuras.regionPrototype.AddExpandFunction(data, region, cloneId, parent, parent.regionType) + Private.regionPrototype.AddSetDurationInfo(region); + Private.regionPrototype.AddExpandFunction(data, region, cloneId, parent, parent.regionType) data.animation = data.animation or {}; data.animation.start = data.animation.start or {type = "none"}; diff --git a/WeakAurasOptions/CommonOptions.lua b/WeakAurasOptions/CommonOptions.lua index c05975c..cf00eb3 100644 --- a/WeakAurasOptions/CommonOptions.lua +++ b/WeakAurasOptions/CommonOptions.lua @@ -374,8 +374,17 @@ end local function CreateHiddenAll(subOption) return function(data, info) + local mainOptions = OptionsPrivate.EnsureOptions(data, subOption) + for i=1,#info do + mainOptions = mainOptions.args[info[i]]; + end + if(#data.controlledChildren == 0) then - return true; + if mainOptions.hiddenAllIfAnyHidden then + return false + else + return true + end end for child in OptionsPrivate.Private.TraverseLeafs(data) do @@ -387,13 +396,24 @@ local function CreateHiddenAll(subOption) childOptionTable[i] = childOption; end if (childOption) then - if (not hiddenChild(childOptionTable, info)) then - return false; + local childHidden = hiddenChild(childOptionTable, info) + if mainOptions.hiddenAllIfAnyHidden then + if childHidden then + return true + end + else + if not childHidden then + return false + end end end end - return true; + if mainOptions.hiddenAllIfAnyHidden then + return false + else + return true + end end end diff --git a/WeakAurasOptions/RegionOptions/AuraBar.lua b/WeakAurasOptions/RegionOptions/AuraBar.lua index 47c0517..e56f894 100644 --- a/WeakAurasOptions/RegionOptions/AuraBar.lua +++ b/WeakAurasOptions/RegionOptions/AuraBar.lua @@ -385,7 +385,7 @@ local function createOptions(id, data) }, }; - options = WeakAuras.regionPrototype.AddAdjustedDurationOptions(options, data, 36.5); + options = OptionsPrivate.Private.regionPrototype.AddAdjustedDurationOptions(options, data, 36.5); local overlayInfo = OptionsPrivate.Private.GetOverlayInfo(data); if (overlayInfo and next(overlayInfo)) then diff --git a/WeakAurasOptions/RegionOptions/ProgressTexture.lua b/WeakAurasOptions/RegionOptions/ProgressTexture.lua index 01a0625..3238ada 100644 --- a/WeakAurasOptions/RegionOptions/ProgressTexture.lua +++ b/WeakAurasOptions/RegionOptions/ProgressTexture.lua @@ -288,7 +288,7 @@ local function createOptions(id, data) name = "", }, }; - options = WeakAuras.regionPrototype.AddAdjustedDurationOptions(options, data, 57); + options = OptionsPrivate.Private.regionPrototype.AddAdjustedDurationOptions(options, data, 57); local overlayInfo = OptionsPrivate.Private.GetOverlayInfo(data); if (overlayInfo and next(overlayInfo)) then