Clean up WeakAuras table and remove members that no one should touch

This commit is contained in:
NoM0Re
2025-01-09 15:14:12 +01:00
parent e5938f813d
commit a5dbbd2640
33 changed files with 529 additions and 467 deletions
+3 -3
View File
@@ -928,8 +928,8 @@ local function modify(parent, region, data)
self.updatedChildren[regionData] = true
end
end
if childData and WeakAuras.clones[childID] then
for cloneID, cloneRegion in pairs(WeakAuras.clones[childID]) do
if childData and Private.clones[childID] then
for cloneID, cloneRegion in pairs(Private.clones[childID]) do
local regionData = createRegionData(childData, cloneRegion, childID, cloneID, dataIndex)
if cloneRegion.toShow then
tinsert(self.sortedChildren, regionData)
@@ -1266,7 +1266,7 @@ local function modify(parent, region, data)
self:Hide()
end
if WeakAuras.IsOptionsOpen() then
WeakAuras.OptionsFrame().moversizer:ReAnchor()
Private.OptionsFrame().moversizer:ReAnchor()
end
Private.StopProfileSystem("dynamicgroup")
Private.StopProfileAura(data.id)
+1 -1
View File
@@ -138,7 +138,7 @@ local function modify(parent, region, data)
-- Scan children for visibility
if not childVisible then
for child in Private.TraverseLeafs(data) do
local childRegion = WeakAuras.regions[child.id] and WeakAuras.regions[child.id].region;
local childRegion = Private.regions[child.id] and Private.regions[child.id].region;
if childRegion and childRegion.toShow then
childVisible = true;
break;
+1 -1
View File
@@ -280,7 +280,7 @@ end
do
function Private.PreShowModels(self, event)
Private.StartProfileSystem("model");
for id, data in pairs(WeakAuras.regions) do
for id, data in pairs(Private.regions) do
Private.StartProfileAura(id);
if data.region.toShow then
if (data.regionType == "model") then
+6 -6
View File
@@ -118,13 +118,13 @@ local screenWidth, screenHeight = math.ceil(GetScreenWidth() / 20) * 20, math.ce
function Private.GetAnchorsForData(parentData, type)
local result
if not parentData.controlledChildren then
if not WeakAuras.regionOptions[parentData.regionType] then
if not Private.regionOptions[parentData.regionType] then
return
end
local anchors
if WeakAuras.regionOptions[parentData.regionType].getAnchors then
anchors = WeakAuras.regionOptions[parentData.regionType].getAnchors(parentData)
if Private.regionOptions[parentData.regionType].getAnchors then
anchors = Private.regionOptions[parentData.regionType].getAnchors(parentData)
else
anchors = Private.default_types_for_anchor
end
@@ -452,7 +452,7 @@ end
WeakAuras.regionPrototype.AnchorSubRegion = AnchorSubRegion
function WeakAuras.regionPrototype.create(region)
local defaultsForRegion = WeakAuras.regionTypes[region.regionType] and WeakAuras.regionTypes[region.regionType].default;
local defaultsForRegion = Private.regionTypes[region.regionType] and Private.regionTypes[region.regionType].default;
region.SoundPlay = SoundPlay;
region.SoundRepeatStop = SoundRepeatStop;
region.SendChat = SendChat;
@@ -501,7 +501,7 @@ function WeakAuras.regionPrototype.modify(parent, region, data)
region.states = nil
region.subRegionEvents:ClearSubscribers()
local defaultsForRegion = WeakAuras.regionTypes[data.regionType] and WeakAuras.regionTypes[data.regionType].default;
local defaultsForRegion = Private.regionTypes[data.regionType] and Private.regionTypes[data.regionType].default;
if region.SetRegionAlpha then
region:SetRegionAlpha(data.alpha)
@@ -626,7 +626,7 @@ local regionsForFrameTick = {}
local frameForFrameTick = CreateFrame("Frame");
WeakAuras.frames["Frame Tick Frame"] = frameForFrameTick
Private.frames["Frame Tick Frame"] = frameForFrameTick
local function FrameTick()
if WeakAuras.IsOptionsOpen() then
+4 -4
View File
@@ -142,8 +142,8 @@ local function modify(parent, region, data)
region:SetHeight(height)
if data.parent then
Private.EnsureRegion(data.parent)
if WeakAuras.regions[data.parent].region.PositionChildren then
WeakAuras.regions[data.parent].region:PositionChildren()
if Private.regions[data.parent].region.PositionChildren then
Private.regions[data.parent].region:PositionChildren()
end
end
end
@@ -165,8 +165,8 @@ local function modify(parent, region, data)
region.height = height;
region:SetWidth(region.width);
region:SetHeight(region.height);
if(data.parent and WeakAuras.regions[data.parent].region.PositionChildren) then
WeakAuras.regions[data.parent].region:PositionChildren();
if(data.parent and Private.regions[data.parent].region.PositionChildren) then
Private.regions[data.parent].region:PositionChildren();
end
end
end