from retail

This commit is contained in:
Bunny67
2021-03-07 19:42:16 +03:00
parent b3be159906
commit 6e530142d3
41 changed files with 2796 additions and 2128 deletions
+34 -2
View File
@@ -853,7 +853,7 @@ local function addControlsForChange(args, order, data, conditionVariable, condit
if (not message) then
return true;
end
if (not OptionsPrivate.Private.ContainsPlaceHolders(message, "c")) then
if (not OptionsPrivate.Private.ContainsCustomPlaceHolder(message)) then
return true;
end
@@ -1822,7 +1822,7 @@ local function addControlsForCondition(args, order, data, conditionVariable, con
type = "execute",
name = L["Condition %i"]:format(i),
order = order,
width = WeakAuras.doubleWidth - 0.45,
width = WeakAuras.doubleWidth - 0.6,
func = function()
if data.controlledChildren then
for id, reference in pairs(conditions[i].check.references) do
@@ -1948,6 +1948,38 @@ local function addControlsForCondition(args, order, data, conditionVariable, con
};
order = order + 1;
args["condition" .. i .. "duplicate"] = {
type = "execute",
name = L["Duplicate"],
order = order,
func = function()
if (data.controlledChildren) then
for id, reference in pairs(conditions[i].check.references) do
local auraData = WeakAuras.GetData(id);
local clone = CopyTable(auraData[conditionVariable][reference.conditionIndex])
tinsert(auraData[conditionVariable], reference.conditionIndex + 1, clone);
WeakAuras.Add(auraData);
OptionsPrivate.DuplicateCollapseData(auraData.id, "condition", {reference.conditionIndex})
end
WeakAuras.ClearAndUpdateOptions(data.id, true)
return;
else
local clone = CopyTable(conditions[i])
tinsert(conditions, i + 1, clone);
WeakAuras.Add(data);
OptionsPrivate.DuplicateCollapseData(data.id, "condition", {i})
WeakAuras.ClearAndUpdateOptions(data.id, true)
return;
end
end,
width = 0.15,
image = "Interface\\AddOns\\WeakAuras\\Media\\Textures\\duplicate",
imageWidth = 24,
imageHeight = 24,
control = "WeakAurasIcon"
};
order = order + 1;
args["condition" .. i .. "delete"] = {
type = "execute",
name = L["Delete"],