Clean up WeakAuras table and remove members that no one should touch
This commit is contained in:
@@ -283,7 +283,7 @@ local Actions = {
|
||||
["Group"] = function(source, groupId, target, before)
|
||||
if source and not source.data.parent then
|
||||
if groupId then
|
||||
local group = WeakAuras.GetDisplayButton(groupId)
|
||||
local group = OptionsPrivate.GetDisplayButton(groupId)
|
||||
if group and group:IsGroup() then
|
||||
local children = group.data.controlledChildren
|
||||
if target then
|
||||
@@ -337,7 +337,7 @@ local Actions = {
|
||||
OptionsPrivate.Private.AddParents(parent)
|
||||
WeakAuras.UpdateGroupOrders(parent);
|
||||
WeakAuras.ClearAndUpdateOptions(parent.id);
|
||||
local group = WeakAuras.GetDisplayButton(parent.id)
|
||||
local group = OptionsPrivate.GetDisplayButton(parent.id)
|
||||
group.callbacks.UpdateExpandButton();
|
||||
group:UpdateParentWarning()
|
||||
group:ReloadTooltip()
|
||||
@@ -376,7 +376,7 @@ end
|
||||
-------------------------
|
||||
|
||||
local function GetDropTarget()
|
||||
local buttonList = WeakAuras.displayButtons
|
||||
local buttonList = OptionsPrivate.displayButtons
|
||||
|
||||
for id, button in pairs(buttonList) do
|
||||
if not button.dragging and button:IsEnabled() and button:IsShown() then
|
||||
@@ -405,7 +405,7 @@ end
|
||||
|
||||
local function Show_DropIndicator(id)
|
||||
local indicator = OptionsPrivate.DropIndicator()
|
||||
local source = WeakAuras.GetDisplayButton(id)
|
||||
local source = OptionsPrivate.GetDisplayButton(id)
|
||||
local target, pos
|
||||
if source then
|
||||
target, pos = select(2, GetDropTarget())
|
||||
@@ -519,7 +519,7 @@ local methods = {
|
||||
for index, selectedId in ipairs(self.grouping) do
|
||||
local selectedData = WeakAuras.GetData(selectedId);
|
||||
tinsert(self.data.controlledChildren, selectedId);
|
||||
local selectedButton = WeakAuras.GetDisplayButton(selectedId);
|
||||
local selectedButton = OptionsPrivate.GetDisplayButton(selectedId);
|
||||
while selectedData.parent do
|
||||
selectedButton:Ungroup();
|
||||
end
|
||||
@@ -535,7 +535,7 @@ local methods = {
|
||||
|
||||
if (selectedData.controlledChildren) then
|
||||
for child in OptionsPrivate.Private.TraverseAllChildren(selectedData) do
|
||||
local childButton = WeakAuras.GetDisplayButton(child.id)
|
||||
local childButton = OptionsPrivate.GetDisplayButton(child.id)
|
||||
childButton:UpdateOffset()
|
||||
end
|
||||
end
|
||||
@@ -618,12 +618,12 @@ local methods = {
|
||||
-- And this fills in the leafs
|
||||
DuplicateAuras(self.data, newGroup, mapping)
|
||||
|
||||
local button = WeakAuras.GetDisplayButton(newGroup.id)
|
||||
local button = OptionsPrivate.GetDisplayButton(newGroup.id)
|
||||
button.callbacks.UpdateExpandButton()
|
||||
button:UpdateParentWarning()
|
||||
|
||||
for old, new in pairs(mapping) do
|
||||
local button = WeakAuras.GetDisplayButton(new.id)
|
||||
local button = OptionsPrivate.GetDisplayButton(new.id)
|
||||
button.callbacks.UpdateExpandButton()
|
||||
button:UpdateParentWarning()
|
||||
end
|
||||
@@ -679,7 +679,7 @@ local methods = {
|
||||
OptionsPrivate.Private.AddParents(parentData)
|
||||
WeakAuras.ClearAndUpdateOptions(parentData.id)
|
||||
self:SetGroupOrder(index - 1, #parentData.controlledChildren);
|
||||
local otherbutton = WeakAuras.GetDisplayButton(parentData.controlledChildren[index]);
|
||||
local otherbutton = OptionsPrivate.GetDisplayButton(parentData.controlledChildren[index]);
|
||||
otherbutton:SetGroupOrder(index, #parentData.controlledChildren);
|
||||
OptionsPrivate.SortDisplayButtons();
|
||||
local updata = {duration = 0.15, type = "custom", use_translate = true, x = 0, y = -32};
|
||||
@@ -718,7 +718,7 @@ local methods = {
|
||||
OptionsPrivate.Private.AddParents(parentData)
|
||||
WeakAuras.ClearAndUpdateOptions(parentData.id)
|
||||
self:SetGroupOrder(index + 1, #parentData.controlledChildren);
|
||||
local otherbutton = WeakAuras.GetDisplayButton(parentData.controlledChildren[index]);
|
||||
local otherbutton = OptionsPrivate.GetDisplayButton(parentData.controlledChildren[index]);
|
||||
otherbutton:SetGroupOrder(index, #parentData.controlledChildren);
|
||||
OptionsPrivate.SortDisplayButtons()
|
||||
local updata = {duration = 0.15, type = "custom", use_translate = true, x = 0, y = -32};
|
||||
@@ -739,12 +739,12 @@ local methods = {
|
||||
local suspended = OptionsPrivate.Private.PauseAllDynamicGroups()
|
||||
if(self.view.visibility == 2) then
|
||||
for child in OptionsPrivate.Private.TraverseAllChildren(self.data) do
|
||||
WeakAuras.GetDisplayButton(child.id):PriorityHide(2);
|
||||
OptionsPrivate.GetDisplayButton(child.id):PriorityHide(2);
|
||||
end
|
||||
self:PriorityHide(2)
|
||||
else
|
||||
for child in OptionsPrivate.Private.TraverseAllChildren(self.data) do
|
||||
WeakAuras.GetDisplayButton(child.id):PriorityShow(2);
|
||||
OptionsPrivate.GetDisplayButton(child.id):PriorityShow(2);
|
||||
end
|
||||
self:PriorityShow(2)
|
||||
end
|
||||
@@ -837,7 +837,7 @@ local methods = {
|
||||
|
||||
if (not self.data.controlledChildren) then
|
||||
local convertMenu = {};
|
||||
for regionType, regionData in pairs(WeakAuras.regionOptions) do
|
||||
for regionType, regionData in pairs(OptionsPrivate.Private.regionOptions) do
|
||||
if(regionType ~= "group" and regionType ~= "dynamicgroup" and regionType ~= self.data.regionType) then
|
||||
tinsert(convertMenu, {
|
||||
text = regionData.displayName,
|
||||
@@ -1016,7 +1016,7 @@ local methods = {
|
||||
tinsert(namestable, {" ", "|cFF00FFFF"..L["Control-click to select multiple displays"]});
|
||||
end
|
||||
tinsert(namestable, {" ", "|cFF00FFFF"..L["Shift-click to create chat link"]});
|
||||
local regionData = WeakAuras.regionOptions[data.regionType or ""]
|
||||
local regionData = OptionsPrivate.Private.regionOptions[data.regionType or ""]
|
||||
local displayName = regionData and regionData.displayName or "";
|
||||
self:SetDescription({data.id, displayName}, unpack(namestable));
|
||||
end,
|
||||
@@ -1091,14 +1091,14 @@ local methods = {
|
||||
end
|
||||
WeakAuras.ClearAndUpdateOptions(self.data.id);
|
||||
WeakAuras.UpdateGroupOrders(parentData);
|
||||
local parentButton = WeakAuras.GetDisplayButton(parentData.id)
|
||||
local parentButton = OptionsPrivate.GetDisplayButton(parentData.id)
|
||||
if(#parentData.controlledChildren == 0) then
|
||||
parentButton:DisableExpand()
|
||||
end
|
||||
parentButton:UpdateParentWarning()
|
||||
|
||||
for child in OptionsPrivate.Private.TraverseAllChildren(self.data) do
|
||||
local button = WeakAuras.GetDisplayButton(child.id)
|
||||
local button = OptionsPrivate.GetDisplayButton(child.id)
|
||||
button:UpdateOffset()
|
||||
end
|
||||
|
||||
@@ -1471,7 +1471,7 @@ local methods = {
|
||||
["UpdateParentWarning"] = function(self)
|
||||
self:UpdateWarning()
|
||||
for parent in OptionsPrivate.Private.TraverseParents(self.data) do
|
||||
local parentButton = WeakAuras.GetDisplayButton(parent.id)
|
||||
local parentButton = OptionsPrivate.GetDisplayButton(parent.id)
|
||||
if parentButton then
|
||||
parentButton:UpdateWarning()
|
||||
end
|
||||
@@ -1585,17 +1585,17 @@ local methods = {
|
||||
end,
|
||||
["RecheckParentVisibility"] = function(self)
|
||||
if self.data.parent then
|
||||
local parentButton = WeakAuras.GetDisplayButton(self.data.parent)
|
||||
local parentButton = OptionsPrivate.GetDisplayButton(self.data.parent)
|
||||
parentButton:RecheckVisibility()
|
||||
else
|
||||
WeakAuras.OptionsFrame().loadedButton:RecheckVisibility()
|
||||
WeakAuras.OptionsFrame().unloadedButton:RecheckVisibility()
|
||||
OptionsPrivate.Private.OptionsFrame().loadedButton:RecheckVisibility()
|
||||
OptionsPrivate.Private.OptionsFrame().unloadedButton:RecheckVisibility()
|
||||
end
|
||||
end,
|
||||
["RecheckVisibility"] = function(self)
|
||||
local none, all = true, true;
|
||||
for child in OptionsPrivate.Private.TraverseAllChildren(self.data) do
|
||||
local childButton = WeakAuras.GetDisplayButton(child.id);
|
||||
local childButton = OptionsPrivate.GetDisplayButton(child.id);
|
||||
if(childButton) then
|
||||
if(childButton:GetVisibility() ~= 2) then
|
||||
all = false;
|
||||
@@ -1693,7 +1693,7 @@ local methods = {
|
||||
self:ReleaseThumbnail()
|
||||
self:AcquireThumbnail()
|
||||
else
|
||||
local option = WeakAuras.regionOptions[self.thumbnailType]
|
||||
local option = OptionsPrivate.Private.regionOptions[self.thumbnailType]
|
||||
if option and option.modifyThumbnail then
|
||||
option.modifyThumbnail(self.frame, self.thumbnail, self.data)
|
||||
end
|
||||
@@ -1707,7 +1707,7 @@ local methods = {
|
||||
|
||||
if self.thumbnail then
|
||||
local regionType = self.thumbnailType
|
||||
local option = WeakAuras.regionOptions[regionType]
|
||||
local option = OptionsPrivate.Private.regionOptions[regionType]
|
||||
option.releaseThumbnail(self.thumbnail)
|
||||
self.thumbnail = nil
|
||||
end
|
||||
@@ -1727,7 +1727,7 @@ local methods = {
|
||||
local regionType = self.data.regionType
|
||||
self.thumbnailType = regionType
|
||||
|
||||
local option = WeakAuras.regionOptions[regionType]
|
||||
local option = OptionsPrivate.Private.regionOptions[regionType]
|
||||
if option and option.acquireThumbnail then
|
||||
self.thumbnail = option.acquireThumbnail(button, self.data)
|
||||
self:SetIcon(self.thumbnail)
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
if not WeakAuras.IsLibsOK() then return end
|
||||
local AddonName, OptionsPrivate = ...
|
||||
|
||||
local Type, Version = "WeakAurasNewButton", 25
|
||||
local AceGUI = LibStub and LibStub("AceGUI-3.0", true)
|
||||
@@ -55,7 +56,7 @@ local methods = {
|
||||
end
|
||||
end,
|
||||
["SetThumbnail"] = function(self, regionType, data)
|
||||
local regionData = WeakAuras.regionOptions[regionType]
|
||||
local regionData = OptionsPrivate.Private.regionOptions[regionType]
|
||||
if regionData and regionData.acquireThumbnail then
|
||||
local thumbnail = regionData.acquireThumbnail(self.frame, data)
|
||||
self:SetIcon(thumbnail)
|
||||
@@ -65,7 +66,7 @@ local methods = {
|
||||
end,
|
||||
["ReleaseThumbnail"] = function(self)
|
||||
if self.thumbnail then
|
||||
local regionData = WeakAuras.regionOptions[self.thumbnailType]
|
||||
local regionData = OptionsPrivate.Private.regionOptions[self.thumbnailType]
|
||||
if regionData and regionData.releaseThumbnail then
|
||||
regionData.releaseThumbnail(self.thumbnail)
|
||||
end
|
||||
|
||||
@@ -84,7 +84,7 @@ local methods = {
|
||||
self:ReleaseThumbnail()
|
||||
self:AcquireThumbnail()
|
||||
else
|
||||
local option = WeakAuras.regionOptions[self.thumbnailType]
|
||||
local option = OptionsPrivate.Private.regionOptions[self.thumbnailType]
|
||||
if option and option.modifyThumbnail then
|
||||
option.modifyThumbnail(self.frame, self.thumbnail, self.data)
|
||||
end
|
||||
@@ -98,7 +98,7 @@ local methods = {
|
||||
|
||||
if self.thumbnail then
|
||||
local regionType = self.thumbnailType
|
||||
local option = WeakAuras.regionOptions[regionType]
|
||||
local option = OptionsPrivate.Private.regionOptions[regionType]
|
||||
if self.thumbnail.icon then
|
||||
self.thumbnail.icon:SetDesaturated(false)
|
||||
end
|
||||
@@ -121,7 +121,7 @@ local methods = {
|
||||
local regionType = self.data.regionType
|
||||
self.thumbnailType = regionType
|
||||
|
||||
local option = WeakAuras.regionOptions[regionType]
|
||||
local option = OptionsPrivate.Private.regionOptions[regionType]
|
||||
if option and option.acquireThumbnail then
|
||||
self.thumbnail = option.acquireThumbnail(button, self.data)
|
||||
if self.thumbnail.icon then
|
||||
|
||||
@@ -214,7 +214,7 @@ local methods = {
|
||||
self:ReleaseThumbnail()
|
||||
self:AcquireThumbnail()
|
||||
else
|
||||
local option = WeakAuras.regionOptions[self.thumbnailType]
|
||||
local option = OptionsPrivate.Private.regionOptions[self.thumbnailType]
|
||||
if option and option.modifyThumbnail then
|
||||
option.modifyThumbnail(self.frame, self.thumbnail, self.data)
|
||||
end
|
||||
@@ -228,7 +228,7 @@ local methods = {
|
||||
|
||||
if self.thumbnail then
|
||||
local regionType = self.thumbnailType
|
||||
local option = WeakAuras.regionOptions[regionType]
|
||||
local option = OptionsPrivate.Private.regionOptions[regionType]
|
||||
if self.thumbnail.icon then
|
||||
self.thumbnail.icon:SetDesaturated(false)
|
||||
end
|
||||
@@ -251,7 +251,7 @@ local methods = {
|
||||
local regionType = self.data.regionType
|
||||
self.thumbnailType = regionType
|
||||
|
||||
local option = WeakAuras.regionOptions[regionType]
|
||||
local option = OptionsPrivate.Private.regionOptions[regionType]
|
||||
if option and option.acquireThumbnail then
|
||||
self.thumbnail = option.acquireThumbnail(button, self.data)
|
||||
if self.thumbnail.icon then
|
||||
|
||||
@@ -17,8 +17,8 @@ local setAll = OptionsPrivate.commonOptions.CreateSetAll("animation", getAll)
|
||||
local function filterAnimPresetTypes(intable, id)
|
||||
local ret = {};
|
||||
OptionsPrivate.Private.EnsureRegion(id)
|
||||
local region = WeakAuras.regions[id] and WeakAuras.regions[id].region;
|
||||
local regionType = WeakAuras.regions[id] and WeakAuras.regions[id].regionType;
|
||||
local region = OptionsPrivate.Private.regions[id] and OptionsPrivate.Private.regions[id].region;
|
||||
local regionType = OptionsPrivate.Private.regions[id] and OptionsPrivate.Private.regions[id].regionType;
|
||||
local data = WeakAuras.GetData(id);
|
||||
|
||||
if data.controlledChildren then
|
||||
@@ -82,8 +82,8 @@ function OptionsPrivate.GetAnimationOptions(data)
|
||||
if(field == "main") then
|
||||
local region = OptionsPrivate.Private.EnsureRegion(id)
|
||||
OptionsPrivate.Private.Animate("display", data.uid, "main", data.animation.main, region, false, nil, true);
|
||||
if(WeakAuras.clones[id]) then
|
||||
for cloneId, cloneRegion in pairs(WeakAuras.clones[id]) do
|
||||
if(OptionsPrivate.Private.clones[id]) then
|
||||
for cloneId, cloneRegion in pairs(OptionsPrivate.Private.clones[id]) do
|
||||
OptionsPrivate.Private.Animate("display", data.uid, "main", data.animation.main, cloneRegion, false, nil, true, cloneId);
|
||||
end
|
||||
end
|
||||
@@ -928,8 +928,8 @@ function OptionsPrivate.GetAnimationOptions(data)
|
||||
local function extraSetFunction()
|
||||
OptionsPrivate.Private.Animate("display", data.uid, "main", data.animation.main,
|
||||
OptionsPrivate.Private.EnsureRegion(id), false, nil, true)
|
||||
if(WeakAuras.clones[id]) then
|
||||
for cloneId, cloneRegion in pairs(WeakAuras.clones[id]) do
|
||||
if(OptionsPrivate.Private.clones[id]) then
|
||||
for cloneId, cloneRegion in pairs(OptionsPrivate.Private.clones[id]) do
|
||||
OptionsPrivate.Private.Animate("display", data.uid, "main", data.animation.main,
|
||||
cloneRegion, false, nil, true, cloneId)
|
||||
end
|
||||
|
||||
@@ -2,7 +2,6 @@ if not WeakAuras.IsLibsOK() then return end
|
||||
local AddonName, OptionsPrivate = ...
|
||||
|
||||
local L = WeakAuras.L
|
||||
local regionOptions = WeakAuras.regionOptions
|
||||
|
||||
local commonOptionsCache = {}
|
||||
OptionsPrivate.commonOptionsCache = commonOptionsCache
|
||||
@@ -500,7 +499,7 @@ local function replaceNameDescFuncs(intable, data, subOption)
|
||||
local index = string.find(input, ".", 1, true);
|
||||
if (index) then
|
||||
local regionType = string.sub(input, 1, index - 1);
|
||||
return regionOptions[regionType] and regionType;
|
||||
return OptionsPrivate.Private.regionOptions[regionType] and regionType;
|
||||
end
|
||||
return nil;
|
||||
end
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
if not WeakAuras.IsLibsOK() then return end
|
||||
local AddonName, OptionsPrivate = ...
|
||||
local L = WeakAuras.L
|
||||
local regionOptions = WeakAuras.regionOptions
|
||||
|
||||
local flattenRegionOptions = OptionsPrivate.commonOptions.flattenRegionOptions
|
||||
local fixMetaOrders = OptionsPrivate.commonOptions.fixMetaOrders
|
||||
@@ -90,8 +89,8 @@ function OptionsPrivate.GetDisplayOptions(data)
|
||||
|
||||
local hasSubElements = false
|
||||
|
||||
if(regionOptions[data.regionType]) then
|
||||
regionOption = regionOptions[data.regionType].create(id, data);
|
||||
if(OptionsPrivate.Private.regionOptions[data.regionType]) then
|
||||
regionOption = OptionsPrivate.Private.regionOptions[data.regionType].create(id, data);
|
||||
|
||||
if data.subRegions then
|
||||
local subIndex = {}
|
||||
@@ -210,8 +209,8 @@ function OptionsPrivate.GetDisplayOptions(data)
|
||||
for child in OptionsPrivate.Private.TraverseLeafs(data) do
|
||||
if child and not handledRegionTypes[child.regionType] then
|
||||
handledRegionTypes[child.regionType] = true;
|
||||
if regionOptions[child.regionType] then
|
||||
allOptions = union(allOptions, regionOptions[child.regionType].create(id, data));
|
||||
if OptionsPrivate.Private.regionOptions[child.regionType] then
|
||||
allOptions = union(allOptions, OptionsPrivate.Private.regionOptions[child.regionType].create(id, data));
|
||||
else
|
||||
unsupportedCount = unsupportedCount + 1
|
||||
allOptions["__unsupported" .. unsupportedCount] = {
|
||||
|
||||
@@ -2,15 +2,14 @@ if not WeakAuras.IsLibsOK() then return end
|
||||
local AddonName, OptionsPrivate = ...
|
||||
|
||||
local L = WeakAuras.L
|
||||
local regionOptions = WeakAuras.regionOptions;
|
||||
local parsePrefix = OptionsPrivate.commonOptions.parsePrefix
|
||||
local flattenRegionOptions = OptionsPrivate.commonOptions.flattenRegionOptions
|
||||
|
||||
function OptionsPrivate.GetGroupOptions(data)
|
||||
local regionOption;
|
||||
local id = data.id
|
||||
if (regionOptions[data.regionType]) then
|
||||
regionOption = regionOptions[data.regionType].create(id, data);
|
||||
if (OptionsPrivate.Private.regionOptions[data.regionType]) then
|
||||
regionOption = OptionsPrivate.Private.regionOptions[data.regionType].create(id, data);
|
||||
else
|
||||
regionOption = {
|
||||
[data.regionType] = {
|
||||
|
||||
@@ -17,7 +17,7 @@ local frameChooserBox
|
||||
local oldFocus
|
||||
local oldFocusName
|
||||
function OptionsPrivate.StartFrameChooser(data, path)
|
||||
local frame = WeakAuras.OptionsFrame();
|
||||
local frame = OptionsPrivate.Private.OptionsFrame();
|
||||
if not(frameChooserFrame) then
|
||||
frameChooserFrame = CreateFrame("Frame");
|
||||
frameChooserBox = CreateFrame("Frame", nil, frameChooserFrame);
|
||||
@@ -50,7 +50,7 @@ function OptionsPrivate.StartFrameChooser(data, path)
|
||||
if(focusName == "WorldFrame" or not focusName) then
|
||||
focusName = nil;
|
||||
local focusIsGroup = false;
|
||||
for id, regionData in pairs(WeakAuras.regions) do
|
||||
for id, regionData in pairs(OptionsPrivate.Private.regions) do
|
||||
if(regionData.region:IsVisible() and MouseIsOver(regionData.region)) then
|
||||
local isGroup = regionData.regionType == "group" or regionData.regionType == "dynamicgroup";
|
||||
if (not focusName or (not isGroup and focusIsGroup)) then
|
||||
|
||||
@@ -380,7 +380,7 @@ local function BuildAlignLines(mover)
|
||||
skipIds[child.id] = true
|
||||
end
|
||||
|
||||
for k, v in pairs(WeakAuras.displayButtons) do
|
||||
for k, v in pairs(OptionsPrivate.displayButtons) do
|
||||
local region = WeakAuras.GetRegion(v.data.id)
|
||||
if not skipIds[k] and v.view.visibility ~= 0 and region then
|
||||
local scale = region:GetEffectiveScale() / UIParent:GetEffectiveScale()
|
||||
|
||||
@@ -17,8 +17,7 @@ local AceConfigRegistry = LibStub("AceConfigRegistry-3.0")
|
||||
local WeakAuras = WeakAuras
|
||||
local L = WeakAuras.L
|
||||
|
||||
local displayButtons = WeakAuras.displayButtons
|
||||
local regionOptions = WeakAuras.regionOptions
|
||||
local displayButtons = OptionsPrivate.displayButtons
|
||||
local tempGroup = OptionsPrivate.tempGroup
|
||||
local aceOptions = {}
|
||||
|
||||
@@ -138,11 +137,11 @@ function OptionsPrivate.CreateFrame()
|
||||
OptionsPrivate.Private.ClearFakeStates()
|
||||
|
||||
|
||||
for id, data in pairs(WeakAuras.regions) do
|
||||
for id, data in pairs(OptionsPrivate.Private.regions) do
|
||||
data.region:Collapse()
|
||||
data.region:OptionsClosed()
|
||||
if WeakAuras.clones[id] then
|
||||
for _, cloneRegion in pairs(WeakAuras.clones[id]) do
|
||||
if OptionsPrivate.Private.clones[id] then
|
||||
for _, cloneRegion in pairs(OptionsPrivate.Private.clones[id]) do
|
||||
cloneRegion:Collapse()
|
||||
cloneRegion:OptionsClosed()
|
||||
end
|
||||
@@ -1126,7 +1125,7 @@ function OptionsPrivate.CreateFrame()
|
||||
end
|
||||
|
||||
if targetId then
|
||||
local pickedButton = WeakAuras.GetDisplayButton(targetId)
|
||||
local pickedButton = OptionsPrivate.GetDisplayButton(targetId)
|
||||
if pickedButton.data.controlledChildren then
|
||||
targetIsDynamicGroup = pickedButton.data.regionType == "dynamicgroup"
|
||||
else
|
||||
@@ -1180,7 +1179,7 @@ function OptionsPrivate.CreateFrame()
|
||||
end
|
||||
|
||||
local regionTypesSorted = {}
|
||||
for regionType, regionData in pairs(regionOptions) do
|
||||
for regionType, regionData in pairs(OptionsPrivate.Private.regionOptions) do
|
||||
tinsert(regionTypesSorted, regionType)
|
||||
end
|
||||
|
||||
@@ -1201,14 +1200,14 @@ function OptionsPrivate.CreateFrame()
|
||||
return false
|
||||
end
|
||||
|
||||
return regionOptions[a].displayName < regionOptions[b].displayName
|
||||
return OptionsPrivate.Private.regionOptions[a].displayName < OptionsPrivate.Private.regionOptions[b].displayName
|
||||
end)
|
||||
|
||||
for index, regionType in ipairs(regionTypesSorted) do
|
||||
if (targetIsDynamicGroup and (regionType == "group" or regionType == "dynamicgroup")) then
|
||||
-- Dynamic groups can't contain group/dynamic groups
|
||||
else
|
||||
local regionData = regionOptions[regionType]
|
||||
local regionData = OptionsPrivate.Private.regionOptions[regionType]
|
||||
local button = AceGUI:Create("WeakAurasNewButton")
|
||||
button:SetTitle(regionData.displayName)
|
||||
if(type(regionData.icon) == "string" or type(regionData.icon) == "table") then
|
||||
@@ -1262,8 +1261,8 @@ function OptionsPrivate.CreateFrame()
|
||||
}
|
||||
|
||||
if not frame.importThumbnail then
|
||||
local thumbnail = regionOptions["text"].createThumbnail(UIParent)
|
||||
regionOptions["text"].modifyThumbnail(UIParent, thumbnail, data)
|
||||
local thumbnail = OptionsPrivate.Private.regionOptions["text"].createThumbnail(UIParent)
|
||||
OptionsPrivate.Private.regionOptions["text"].modifyThumbnail(UIParent, thumbnail, data)
|
||||
thumbnail.mask:SetPoint("BOTTOMLEFT", thumbnail, "BOTTOMLEFT", 3, 3)
|
||||
thumbnail.mask:SetPoint("TOPRIGHT", thumbnail, "TOPRIGHT", -3, -3)
|
||||
frame.importThumbnail = thumbnail
|
||||
|
||||
@@ -1676,7 +1676,7 @@ local methods = {
|
||||
uidMap:ChangeId(uid, existingData.id)
|
||||
else
|
||||
if WeakAuras.GetData(uidMap:GetIdFor(uid)) then
|
||||
local newId = WeakAuras.FindUnusedId(uidMap:GetIdFor(uid))
|
||||
local newId = OptionsPrivate.Private.FindUnusedId(uidMap:GetIdFor(uid))
|
||||
uidMap:ChangeId(uid, newId)
|
||||
end
|
||||
end
|
||||
@@ -1731,7 +1731,7 @@ local methods = {
|
||||
if string.sub(data.id, 1, #targetName) == targetName then
|
||||
-- Our name is already prefixed with targetName, don't try to improve
|
||||
else
|
||||
local newId = WeakAuras.FindUnusedId(targetName)
|
||||
local newId = OptionsPrivate.Private.FindUnusedId(targetName)
|
||||
local oldid = data.id
|
||||
WeakAuras.Rename(data, newId)
|
||||
if targetName[aura.uid] then -- We can hope that the aura the squatter renames itself, so try again
|
||||
@@ -1851,7 +1851,7 @@ local methods = {
|
||||
data.authorMode = nil
|
||||
WeakAuras.Add(data)
|
||||
OptionsPrivate.Private.SetHistory(data.uid, data, "import")
|
||||
local button = WeakAuras.GetDisplayButton(data.id)
|
||||
local button = OptionsPrivate.GetDisplayButton(data.id)
|
||||
button:SetData(data)
|
||||
if (data.parent) then
|
||||
local parentIsDynamicGroup = structureUidMap:GetParentIsDynamicGroup(uid)
|
||||
@@ -1875,14 +1875,14 @@ local methods = {
|
||||
for i = #phase2Order, 1, -1 do
|
||||
local uid = phase2Order[i]
|
||||
local data = OptionsPrivate.Private.GetDataByUID(uid)
|
||||
local displayButton = WeakAuras.GetDisplayButton(data.id)
|
||||
local displayButton = OptionsPrivate.GetDisplayButton(data.id)
|
||||
displayButton:UpdateOffset()
|
||||
end
|
||||
end,
|
||||
ImportPhase1 = function(self, uidMap, uid, phase2Order)
|
||||
tinsert(phase2Order, uid)
|
||||
local data = uidMap:GetPhase1Data(uid)
|
||||
local newId = WeakAuras.FindUnusedId(data.id)
|
||||
local newId = OptionsPrivate.Private.FindUnusedId(data.id)
|
||||
uidMap:ChangeId(uid, newId)
|
||||
|
||||
data.preferToUpdate = false
|
||||
@@ -1913,7 +1913,7 @@ local methods = {
|
||||
WeakAuras.Add(data)
|
||||
OptionsPrivate.Private.SetHistory(data.uid, data, "import")
|
||||
|
||||
local button = WeakAuras.GetDisplayButton(data.id)
|
||||
local button = OptionsPrivate.GetDisplayButton(data.id)
|
||||
button:SetData(data)
|
||||
if (data.parent) then
|
||||
local parentIsDynamicGroup = uidMap:GetParentIsDynamicGroup(uid)
|
||||
@@ -1936,7 +1936,7 @@ local methods = {
|
||||
for i = #phase2Order, 1, -1 do
|
||||
local uid = phase2Order[i]
|
||||
local data = OptionsPrivate.Private.GetDataByUID(uid)
|
||||
local displayButton = WeakAuras.GetDisplayButton(data.id)
|
||||
local displayButton = OptionsPrivate.GetDisplayButton(data.id)
|
||||
displayButton:UpdateOffset()
|
||||
end
|
||||
|
||||
|
||||
@@ -149,7 +149,7 @@ local function modifyThumbnail(parent, region, data)
|
||||
|
||||
local model = region.model
|
||||
region:SetScript("OnUpdate", function()
|
||||
local optionsFrame = WeakAuras.OptionsFrame();
|
||||
local optionsFrame = OptionsPrivate.Private.OptionsFrame();
|
||||
if optionsFrame then
|
||||
model:SetParent(optionsFrame)
|
||||
region:SetScript("OnUpdate", nil)
|
||||
|
||||
@@ -6,7 +6,7 @@ local AddonName, OptionsPrivate = ...
|
||||
local texture_types = WeakAuras.StopMotion.texture_types;
|
||||
local texture_data = WeakAuras.StopMotion.texture_data;
|
||||
local animation_types = WeakAuras.StopMotion.animation_types;
|
||||
local setTile = WeakAuras.setTile;
|
||||
local setTile = WeakAuras.setTile
|
||||
|
||||
local function setTextureFunc(textureWidget, texturePath, textureName)
|
||||
local data = texture_data[texturePath];
|
||||
|
||||
@@ -23,7 +23,7 @@ local function AdjustConditions(data, replacements)
|
||||
end
|
||||
end
|
||||
|
||||
function WeakAuras.DeleteSubRegion(data, index, regionType)
|
||||
function OptionsPrivate.DeleteSubRegion(data, index, regionType)
|
||||
if not data.subRegions then
|
||||
return
|
||||
end
|
||||
@@ -123,7 +123,7 @@ function OptionsPrivate.AddUpDownDeleteDuplicate(options, parentData, index, sub
|
||||
end
|
||||
options.__delete = function()
|
||||
for child in OptionsPrivate.Private.TraverseLeafsOrAura(parentData) do
|
||||
WeakAuras.DeleteSubRegion(child, index, subRegionType)
|
||||
OptionsPrivate.DeleteSubRegion(child, index, subRegionType)
|
||||
end
|
||||
WeakAuras.ClearAndUpdateOptions(parentData.id)
|
||||
end
|
||||
|
||||
@@ -19,7 +19,7 @@ local L = WeakAuras.L
|
||||
local ADDON_NAME = "WeakAurasOptions";
|
||||
|
||||
local displayButtons = {};
|
||||
WeakAuras.displayButtons = displayButtons;
|
||||
OptionsPrivate.displayButtons = displayButtons;
|
||||
|
||||
local spellCache = WeakAuras.spellCache;
|
||||
local savedVars = {};
|
||||
@@ -93,13 +93,13 @@ function OptionsPrivate.DuplicateAura(data, newParent, massEdit, targetIndex)
|
||||
OptionsPrivate.Private.AddParents(parentData)
|
||||
|
||||
for index, id in pairs(parentData.controlledChildren) do
|
||||
local childButton = WeakAuras.GetDisplayButton(id)
|
||||
local childButton = OptionsPrivate.GetDisplayButton(id)
|
||||
childButton:SetGroup(parentData.id, parentData.regionType == "dynamicgroup")
|
||||
childButton:SetGroupOrder(index, #parentData.controlledChildren)
|
||||
end
|
||||
|
||||
if not massEdit then
|
||||
local button = WeakAuras.GetDisplayButton(parentData.id)
|
||||
local button = OptionsPrivate.GetDisplayButton(parentData.id)
|
||||
button.callbacks.UpdateExpandButton()
|
||||
button:UpdateParentWarning()
|
||||
end
|
||||
@@ -244,7 +244,7 @@ local function commonParent(controlledChildren)
|
||||
local targetIndex = math.huge
|
||||
for index, id in ipairs(controlledChildren) do
|
||||
local childData = WeakAuras.GetData(id);
|
||||
local childButton = WeakAuras.GetDisplayButton(id)
|
||||
local childButton = OptionsPrivate.GetDisplayButton(id)
|
||||
targetIndex = min(targetIndex, childButton:GetGroupOrder() or math.huge)
|
||||
|
||||
if (parent == nil) then
|
||||
@@ -262,13 +262,13 @@ end
|
||||
|
||||
local function CreateNewGroupFromSelection(regionType, resetChildPositions)
|
||||
local data = {
|
||||
id = WeakAuras.FindUnusedId(tempGroup.controlledChildren[1].." Group"),
|
||||
id = OptionsPrivate.Private.FindUnusedId(tempGroup.controlledChildren[1].." Group"),
|
||||
regionType = regionType,
|
||||
};
|
||||
|
||||
WeakAuras.DeepMixin(data, WeakAuras.data_stub)
|
||||
WeakAuras.DeepMixin(data, OptionsPrivate.Private.data_stub)
|
||||
data.internalVersion = WeakAuras.InternalVersion()
|
||||
WeakAuras.validate(data, WeakAuras.regionTypes[regionType].default);
|
||||
OptionsPrivate.Private.validate(data, OptionsPrivate.Private.regionTypes[regionType].default);
|
||||
|
||||
local parent, targetIndex = commonParent(tempGroup.controlledChildren)
|
||||
|
||||
@@ -283,7 +283,7 @@ local function CreateNewGroupFromSelection(regionType, resetChildPositions)
|
||||
WeakAuras.UpdateGroupOrders(parentData);
|
||||
OptionsPrivate.ClearOptions(parentData.id);
|
||||
|
||||
local parentButton = WeakAuras.GetDisplayButton(parent)
|
||||
local parentButton = OptionsPrivate.GetDisplayButton(parent)
|
||||
parentButton.callbacks.UpdateExpandButton();
|
||||
parentButton:Expand();
|
||||
parentButton:ReloadTooltip();
|
||||
@@ -295,7 +295,7 @@ local function CreateNewGroupFromSelection(regionType, resetChildPositions)
|
||||
|
||||
for index, childId in pairs(tempGroup.controlledChildren) do
|
||||
local childData = WeakAuras.GetData(childId);
|
||||
local childButton = WeakAuras.GetDisplayButton(childId)
|
||||
local childButton = OptionsPrivate.GetDisplayButton(childId)
|
||||
local oldParent = childData.parent
|
||||
local oldParentData = WeakAuras.GetData(oldParent)
|
||||
if (oldParent) then
|
||||
@@ -308,7 +308,7 @@ local function CreateNewGroupFromSelection(regionType, resetChildPositions)
|
||||
OptionsPrivate.Private.AddParents(oldParentData)
|
||||
WeakAuras.UpdateGroupOrders(oldParentData);
|
||||
WeakAuras.ClearAndUpdateOptions(oldParent);
|
||||
local oldParentButton = WeakAuras.GetDisplayButton(oldParent)
|
||||
local oldParentButton = OptionsPrivate.GetDisplayButton(oldParent)
|
||||
oldParentButton.callbacks.UpdateExpandButton();
|
||||
oldParentButton:ReloadTooltip()
|
||||
oldParentButton:UpdateParentWarning()
|
||||
@@ -328,7 +328,7 @@ local function CreateNewGroupFromSelection(regionType, resetChildPositions)
|
||||
childButton:SetGroupOrder(index, #data.controlledChildren);
|
||||
end
|
||||
|
||||
local button = WeakAuras.GetDisplayButton(data.id);
|
||||
local button = OptionsPrivate.GetDisplayButton(data.id);
|
||||
button.callbacks.UpdateExpandButton();
|
||||
button:UpdateParentWarning()
|
||||
OptionsPrivate.SortDisplayButtons();
|
||||
@@ -455,7 +455,7 @@ StaticPopupDialogs["WEAKAURAS_CONFIRM_DELETE"] = {
|
||||
if self.data.parents then
|
||||
for id in pairs(self.data.parents) do
|
||||
local parentData = WeakAuras.GetData(id)
|
||||
local parentButton = WeakAuras.GetDisplayButton(id)
|
||||
local parentButton = OptionsPrivate.GetDisplayButton(id)
|
||||
WeakAuras.UpdateGroupOrders(parentData)
|
||||
if(#parentData.controlledChildren == 0) then
|
||||
parentButton:DisableExpand()
|
||||
@@ -509,14 +509,6 @@ function OptionsPrivate.ConfirmDelete(toDelete, parents)
|
||||
end
|
||||
end
|
||||
|
||||
function WeakAuras.OptionsFrame()
|
||||
if(frame) then
|
||||
return frame;
|
||||
else
|
||||
return nil;
|
||||
end
|
||||
end
|
||||
|
||||
local function AfterScanForLoads()
|
||||
if(frame) then
|
||||
if (frame:IsVisible()) then
|
||||
@@ -558,19 +550,19 @@ end
|
||||
local function OnRename(event, uid, oldid, newid)
|
||||
local data = OptionsPrivate.Private.GetDataByUID(uid)
|
||||
|
||||
WeakAuras.displayButtons[newid] = WeakAuras.displayButtons[oldid];
|
||||
WeakAuras.displayButtons[newid]:SetData(data)
|
||||
WeakAuras.displayButtons[oldid] = nil;
|
||||
OptionsPrivate.displayButtons[newid] = OptionsPrivate.displayButtons[oldid];
|
||||
OptionsPrivate.displayButtons[newid]:SetData(data)
|
||||
OptionsPrivate.displayButtons[oldid] = nil;
|
||||
OptionsPrivate.ClearOptions(oldid)
|
||||
|
||||
WeakAuras.displayButtons[newid]:SetTitle(newid);
|
||||
OptionsPrivate.displayButtons[newid]:SetTitle(newid);
|
||||
|
||||
collapsedOptions[newid] = collapsedOptions[oldid]
|
||||
collapsedOptions[oldid] = nil
|
||||
|
||||
if(data.controlledChildren) then
|
||||
for _, childId in pairs(data.controlledChildren) do
|
||||
WeakAuras.displayButtons[childId]:SetGroup(newid)
|
||||
OptionsPrivate.displayButtons[childId]:SetGroup(newid)
|
||||
end
|
||||
end
|
||||
|
||||
@@ -589,12 +581,21 @@ local function OnRename(event, uid, oldid, newid)
|
||||
end
|
||||
end
|
||||
|
||||
local function OptionsFrame()
|
||||
if(frame) then
|
||||
return frame
|
||||
else
|
||||
return nil
|
||||
end
|
||||
end
|
||||
|
||||
function WeakAuras.ToggleOptions(msg, Private)
|
||||
if not Private then
|
||||
return
|
||||
end
|
||||
if not OptionsPrivate.Private then
|
||||
OptionsPrivate.Private = Private
|
||||
Private.OptionsFrame = OptionsFrame
|
||||
OptionsPrivate.Private.callbacks:RegisterCallback("AuraWarningsUpdated", function(event, uid)
|
||||
local id = OptionsPrivate.Private.UIDtoID(uid)
|
||||
if displayButtons[id] then
|
||||
@@ -603,7 +604,7 @@ function WeakAuras.ToggleOptions(msg, Private)
|
||||
end
|
||||
local data = Private.GetDataByUID(uid)
|
||||
if data and data.parent then
|
||||
local button = WeakAuras.GetDisplayButton(data.parent);
|
||||
local button = OptionsPrivate.GetDisplayButton(data.parent);
|
||||
if button then
|
||||
button:UpdateParentWarning()
|
||||
end
|
||||
@@ -741,7 +742,7 @@ local function LayoutDisplayButtons(msg)
|
||||
button:PriorityShow(1);
|
||||
end
|
||||
end
|
||||
WeakAuras.OptionsFrame().loadedButton:RecheckVisibility()
|
||||
OptionsPrivate.Private.OptionsFrame().loadedButton:RecheckVisibility()
|
||||
end
|
||||
OptionsPrivate.Private.ResumeAllDynamicGroups(suspended)
|
||||
|
||||
@@ -905,8 +906,8 @@ function OptionsPrivate.ConvertDisplay(data, newType)
|
||||
local visibility = displayButtons[id]:GetVisibility();
|
||||
displayButtons[id]:PriorityHide(2);
|
||||
|
||||
if WeakAuras.regions[id] then
|
||||
WeakAuras.regions[id].region:Collapse()
|
||||
if OptionsPrivate.Private.regions[id] then
|
||||
OptionsPrivate.Private.regions[id].region:Collapse()
|
||||
end
|
||||
OptionsPrivate.Private.CollapseAllClones(id);
|
||||
|
||||
@@ -936,7 +937,7 @@ function WeakAuras.UpdateGroupOrders(data)
|
||||
if(data.controlledChildren) then
|
||||
local total = #data.controlledChildren;
|
||||
for index, id in pairs(data.controlledChildren) do
|
||||
local button = WeakAuras.GetDisplayButton(id);
|
||||
local button = OptionsPrivate.GetDisplayButton(id);
|
||||
button:SetGroupOrder(index, total);
|
||||
end
|
||||
end
|
||||
@@ -1326,7 +1327,7 @@ function OptionsPrivate.PickDisplayMultipleShift(target)
|
||||
end
|
||||
end
|
||||
|
||||
function WeakAuras.GetDisplayButton(id)
|
||||
function OptionsPrivate.GetDisplayButton(id)
|
||||
if(id and displayButtons[id]) then
|
||||
return displayButtons[id];
|
||||
end
|
||||
@@ -1351,7 +1352,7 @@ function OptionsPrivate.StartGrouping(data)
|
||||
local children = {};
|
||||
-- start grouping for selected buttons
|
||||
for index, childId in ipairs(tempGroup.controlledChildren) do
|
||||
local button = WeakAuras.GetDisplayButton(childId);
|
||||
local button = OptionsPrivate.GetDisplayButton(childId);
|
||||
button:StartGrouping(tempGroup.controlledChildren, true);
|
||||
children[childId] = true;
|
||||
end
|
||||
@@ -1386,11 +1387,11 @@ function OptionsPrivate.Ungroup(data)
|
||||
|
||||
if (frame.pickedDisplay == tempGroup and #tempGroup.controlledChildren > 0) then
|
||||
for index, childId in ipairs(tempGroup.controlledChildren) do
|
||||
local button = WeakAuras.GetDisplayButton(childId);
|
||||
local button = OptionsPrivate.GetDisplayButton(childId);
|
||||
button:Ungroup(data);
|
||||
end
|
||||
else
|
||||
local button = WeakAuras.GetDisplayButton(data.id);
|
||||
local button = OptionsPrivate.GetDisplayButton(data.id);
|
||||
button:Ungroup(data);
|
||||
end
|
||||
WeakAuras.FillOptions()
|
||||
@@ -1438,8 +1439,8 @@ local function CompareButtonOrder(a, b)
|
||||
if (parents[parent]) then
|
||||
-- We have found the common parent, the last node in the chain is
|
||||
-- Compare the previous nodes GroupOrder
|
||||
local aButton = WeakAuras.GetDisplayButton(parents[parent])
|
||||
local bButton = WeakAuras.GetDisplayButton(bNode)
|
||||
local aButton = OptionsPrivate.GetDisplayButton(parents[parent])
|
||||
local bButton = OptionsPrivate.GetDisplayButton(bNode)
|
||||
return aButton:GetGroupOrder() < bButton:GetGroupOrder()
|
||||
end
|
||||
lastBParent = parent
|
||||
@@ -1448,8 +1449,8 @@ local function CompareButtonOrder(a, b)
|
||||
end
|
||||
|
||||
-- If we are here there was no common parent
|
||||
local aButton = WeakAuras.GetDisplayButton(lastAParent)
|
||||
local bButton = WeakAuras.GetDisplayButton(lastBParent)
|
||||
local aButton = OptionsPrivate.GetDisplayButton(lastAParent)
|
||||
local bButton = OptionsPrivate.GetDisplayButton(lastBParent)
|
||||
|
||||
return aButton.data.id < bButton.data.id
|
||||
end
|
||||
@@ -1518,7 +1519,7 @@ function OptionsPrivate.StartDrag(mainAura)
|
||||
-- set dragging for selected buttons in reverse for ordering
|
||||
|
||||
for child in OptionsPrivate.Private.TraverseAllChildren(tempGroup) do
|
||||
local button = WeakAuras.GetDisplayButton(child.id);
|
||||
local button = OptionsPrivate.GetDisplayButton(child.id);
|
||||
button:DragStart("MULTI", true, mainAura, size)
|
||||
children[child.id] = true
|
||||
end
|
||||
@@ -1534,7 +1535,7 @@ function OptionsPrivate.StartDrag(mainAura)
|
||||
local mode = "GROUP"
|
||||
local children = {};
|
||||
for child in OptionsPrivate.Private.TraverseAll(mainAura) do
|
||||
local button = WeakAuras.GetDisplayButton(child.id);
|
||||
local button = OptionsPrivate.GetDisplayButton(child.id);
|
||||
button:DragStart(mode, true, mainAura)
|
||||
children[child.id] = true
|
||||
end
|
||||
@@ -1665,11 +1666,11 @@ end
|
||||
|
||||
function WeakAuras.SetMoverSizer(id)
|
||||
OptionsPrivate.Private.EnsureRegion(id)
|
||||
if WeakAuras.regions[id].region.toShow then
|
||||
frame.moversizer:SetToRegion(WeakAuras.regions[id].region, db.displays[id])
|
||||
if OptionsPrivate.Private.regions[id].region.toShow then
|
||||
frame.moversizer:SetToRegion(OptionsPrivate.Private.regions[id].region, db.displays[id])
|
||||
else
|
||||
if WeakAuras.clones[id] then
|
||||
local _, clone = next(WeakAuras.clones[id])
|
||||
if OptionsPrivate.Private.clones[id] then
|
||||
local _, clone = next(OptionsPrivate.Private.clones[id])
|
||||
if clone then
|
||||
frame.moversizer:SetToRegion(clone, db.displays[id])
|
||||
end
|
||||
@@ -1694,25 +1695,25 @@ function WeakAuras.NewAura(sourceData, regionType, targetId)
|
||||
local function ensure(t, k, v)
|
||||
return t and k and v and t[k] == v
|
||||
end
|
||||
local new_id = WeakAuras.FindUnusedId("New")
|
||||
local new_id = OptionsPrivate.Private.FindUnusedId("New")
|
||||
local data = {id = new_id, regionType = regionType, uid = WeakAuras.GenerateUniqueID()}
|
||||
WeakAuras.DeepMixin(data, WeakAuras.data_stub);
|
||||
WeakAuras.DeepMixin(data, OptionsPrivate.Private.data_stub);
|
||||
if (sourceData) then
|
||||
WeakAuras.DeepMixin(data, sourceData);
|
||||
end
|
||||
data.internalVersion = WeakAuras.InternalVersion();
|
||||
WeakAuras.validate(data, WeakAuras.regionTypes[regionType].default);
|
||||
OptionsPrivate.Private.validate(data, OptionsPrivate.Private.regionTypes[regionType].default);
|
||||
|
||||
AddDefaultSubRegions(data)
|
||||
|
||||
if targetId then
|
||||
local target = WeakAuras.GetDisplayButton(targetId);
|
||||
local target = OptionsPrivate.GetDisplayButton(targetId);
|
||||
local group
|
||||
if (target) then
|
||||
if (target:IsGroup()) then
|
||||
group = target;
|
||||
else
|
||||
group = WeakAuras.GetDisplayButton(target.data.parent);
|
||||
group = OptionsPrivate.GetDisplayButton(target.data.parent);
|
||||
end
|
||||
if (group) then
|
||||
-- Sanity check so that we don't create a group/dynamic group in a group
|
||||
|
||||
Reference in New Issue
Block a user