from retail

diffchecked
This commit is contained in:
NoM0Re
2025-02-13 18:18:03 +01:00
parent ff7efc349b
commit 4c6277c667
10 changed files with 157 additions and 113 deletions
+3 -2
View File
@@ -2018,8 +2018,9 @@ StaticPopupDialogs["WEAKAURAS_CONFIRM_REPAIR"] = {
Private.Login() Private.Login()
end end
end, end,
whileDead = true,
showAlert = true, whileDead = 1,
showAlert = 1,
timeout = 0, timeout = 0,
preferredindex = STATICPOPUP_NUMDIALOGS preferredindex = STATICPOPUP_NUMDIALOGS
} }
+46 -45
View File
@@ -17,8 +17,8 @@ local setAll = OptionsPrivate.commonOptions.CreateSetAll("animation", getAll)
local function filterAnimPresetTypes(intable, id) local function filterAnimPresetTypes(intable, id)
local ret = {}; local ret = {};
OptionsPrivate.Private.EnsureRegion(id) OptionsPrivate.Private.EnsureRegion(id)
local region = OptionsPrivate.Private.regions[id] and OptionsPrivate.Private.regions[id].region; 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 regionType = OptionsPrivate.Private.regions[id] and OptionsPrivate.Private.regions[id].regionType
local data = WeakAuras.GetData(id); local data = WeakAuras.GetData(id);
if data.controlledChildren then if data.controlledChildren then
@@ -84,7 +84,8 @@ function OptionsPrivate.GetAnimationOptions(data)
OptionsPrivate.Private.Animate("display", data.uid, "main", data.animation.main, region, false, nil, true); OptionsPrivate.Private.Animate("display", data.uid, "main", data.animation.main, region, false, nil, true);
if(OptionsPrivate.Private.clones[id]) then if(OptionsPrivate.Private.clones[id]) then
for cloneId, cloneRegion in pairs(OptionsPrivate.Private.clones[id]) do 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); OptionsPrivate.Private.Animate("display", data.uid, "main", data.animation.main,
cloneRegion, false, nil, true, cloneId);
end end
end end
end end
@@ -350,8 +351,8 @@ function OptionsPrivate.GetAnimationOptions(data)
name = L["Color"], name = L["Color"],
order = 48.2, order = 48.2,
hidden = function() hidden = function()
return (data.animation.start.type ~= "custom" or not OptionsPrivate.Private.EnsureRegion(id).Color) return (data.animation.start.type ~= "custom" or not OptionsPrivate.Private.EnsureRegion(id).Color)
end end
}, },
start_colorType = { start_colorType = {
type = "select", type = "select",
@@ -903,11 +904,11 @@ function OptionsPrivate.GetAnimationOptions(data)
local function extraSetFunction() local function extraSetFunction()
OptionsPrivate.Private.Animate("display", data.uid, "main", data.animation.main, OptionsPrivate.Private.Animate("display", data.uid, "main", data.animation.main,
OptionsPrivate.Private.EnsureRegion(id), false, nil, true) OptionsPrivate.Private.EnsureRegion(id), false, nil, true)
if(OptionsPrivate.Private.clones[id]) then if(OptionsPrivate.Private.clones[id]) then
for cloneId, cloneRegion in pairs(OptionsPrivate.Private.clones[id]) do for cloneId, cloneRegion in pairs(OptionsPrivate.Private.clones[id]) do
OptionsPrivate.Private.Animate("display", data.uid, "main", data.animation.main, OptionsPrivate.Private.Animate("display", data.uid, "main", data.animation.main,
cloneRegion, false, nil, true, cloneId) cloneRegion, false, nil, true, cloneId)
end end
end end
end end
@@ -915,8 +916,8 @@ function OptionsPrivate.GetAnimationOptions(data)
-- Text Editors for "start" -- Text Editors for "start"
local function hideStartAlphaFunc() local function hideStartAlphaFunc()
return data.animation.start.type ~= "custom" return data.animation.start.type ~= "custom"
or data.animation.start.alphaType ~= "custom" or data.animation.start.alphaType ~= "custom"
or not data.animation.start.use_alpha or not data.animation.start.use_alpha
end end
OptionsPrivate.commonOptions.AddCodeOption(animation.args, data, L["Custom Function"], "start_alphaFunc", OptionsPrivate.commonOptions.AddCodeOption(animation.args, data, L["Custom Function"], "start_alphaFunc",
"https://github.com/WeakAuras/WeakAuras2/wiki/Custom-Code-Blocks#alpha-opacity", "https://github.com/WeakAuras/WeakAuras2/wiki/Custom-Code-Blocks#alpha-opacity",
@@ -924,20 +925,20 @@ function OptionsPrivate.GetAnimationOptions(data)
local function hideStartTranslate() local function hideStartTranslate()
return data.animation.start.type ~= "custom" return data.animation.start.type ~= "custom"
or data.animation.start.translateType ~= "custom" or data.animation.start.translateType ~= "custom"
or not data.animation.start.use_translate or not data.animation.start.use_translate
end end
OptionsPrivate.commonOptions.AddCodeOption(animation.args, data, L["Custom Function"], "start_translateFunc", OptionsPrivate.commonOptions.AddCodeOption(animation.args, data, L["Custom Function"], "start_translateFunc",
"https://github.com/WeakAuras/WeakAuras2/wiki/Custom-Code-Blocks#translate-position", "https://github.com/WeakAuras/WeakAuras2/wiki/Custom-Code-Blocks#translate-position",
39.3, hideStartTranslate, {"animation", "start", "translateFunc"}, false); 39.3, hideStartTranslate, {"animation", "start", "translateFunc"}, false);
local function hideStartScale() local function hideStartScale()
return data.animation.start.type ~= "custom" return data.animation.start.type ~= "custom"
or data.animation.start.scaleType ~= "custom" or data.animation.start.scaleType ~= "custom"
or not (data.animation.start.use_scale and OptionsPrivate.Private.EnsureRegion(id).Scale) or not (data.animation.start.use_scale and OptionsPrivate.Private.EnsureRegion(id).Scale)
end end
OptionsPrivate.commonOptions.AddCodeOption(animation.args, data, L["Custom Function"], "start_scaleFunc", OptionsPrivate.commonOptions.AddCodeOption(animation.args, data, L["Custom Function"], "start_scaleFunc",
"https://github.com/WeakAuras/WeakAuras2/wiki/Custom-Code-Blocks#scale-size", "https://github.com/WeakAuras/WeakAuras2/wiki/Custom-Code-Blocks#scale-size",
43.3, hideStartScale, {"animation", "start", "scaleFunc"}, false); 43.3, hideStartScale, {"animation", "start", "scaleFunc"}, false);
local function hideStartRotateFunc() local function hideStartRotateFunc()
@@ -946,45 +947,45 @@ function OptionsPrivate.GetAnimationOptions(data)
or not (data.animation.start.use_rotate and OptionsPrivate.Private.EnsureRegion(id).Rotate) or not (data.animation.start.use_rotate and OptionsPrivate.Private.EnsureRegion(id).Rotate)
end end
OptionsPrivate.commonOptions.AddCodeOption(animation.args, data, L["Custom Function"], "start_rotateFunc", OptionsPrivate.commonOptions.AddCodeOption(animation.args, data, L["Custom Function"], "start_rotateFunc",
"https://github.com/WeakAuras/WeakAuras2/wiki/Custom-Code-Blocks#rotate", "https://github.com/WeakAuras/WeakAuras2/wiki/Custom-Code-Blocks#rotate",
47.3, hideStartRotateFunc, {"animation", "start", "rotateFunc"}, false); 47.3, hideStartRotateFunc, {"animation", "start", "rotateFunc"}, false);
local function hideStartColorFunc() local function hideStartColorFunc()
return data.animation.start.type ~= "custom" return data.animation.start.type ~= "custom"
or data.animation.start.colorType ~= "custom" or data.animation.start.colorType ~= "custom"
or not (data.animation.start.use_color and OptionsPrivate.Private.EnsureRegion(id).Color) or not (data.animation.start.use_color and OptionsPrivate.Private.EnsureRegion(id).Color)
end end
OptionsPrivate.commonOptions.AddCodeOption(animation.args, data, L["Custom Function"], "start_colorFunc", OptionsPrivate.commonOptions.AddCodeOption(animation.args, data, L["Custom Function"], "start_colorFunc",
"https://github.com/WeakAuras/WeakAuras2/wiki/Custom-Code-Blocks#color", "https://github.com/WeakAuras/WeakAuras2/wiki/Custom-Code-Blocks#color",
48.7, hideStartColorFunc, {"animation", "start", "colorFunc"}, false); 48.7, hideStartColorFunc, {"animation", "start", "colorFunc"}, false);
-- Text Editors for "main" -- Text Editors for "main"
local function hideMainAlphaFunc() local function hideMainAlphaFunc()
return data.animation.main.type ~= "custom" return data.animation.main.type ~= "custom"
or data.animation.main.alphaType ~= "custom" or data.animation.main.alphaType ~= "custom"
or not data.animation.main.use_alpha or not data.animation.main.use_alpha
end end
local mainCodeOptions = { extraSetFunction = extraSetFunction } local mainCodeOptions = { extraSetFunction = extraSetFunction }
OptionsPrivate.commonOptions.AddCodeOption(animation.args, data, L["Custom Function"], "main_alphaFunc", OptionsPrivate.commonOptions.AddCodeOption(animation.args, data, L["Custom Function"], "main_alphaFunc",
"https://github.com/WeakAuras/WeakAuras2/wiki/Custom-Code-Blocks#alpha-opacity", "https://github.com/WeakAuras/WeakAuras2/wiki/Custom-Code-Blocks#alpha-opacity",
55.3, hideMainAlphaFunc, {"animation", "main", "alphaFunc"}, false, mainCodeOptions); 55.3, hideMainAlphaFunc, {"animation", "main", "alphaFunc"}, false, mainCodeOptions);
local function hideMainTranslate() local function hideMainTranslate()
return data.animation.main.type ~= "custom" return data.animation.main.type ~= "custom"
or data.animation.main.translateType ~= "custom" or data.animation.main.translateType ~= "custom"
or not data.animation.main.use_translate or not data.animation.main.use_translate
end end
OptionsPrivate.commonOptions.AddCodeOption(animation.args, data, L["Custom Function"], "main_translateFunc", OptionsPrivate.commonOptions.AddCodeOption(animation.args, data, L["Custom Function"], "main_translateFunc",
"https://github.com/WeakAuras/WeakAuras2/wiki/Custom-Code-Blocks#translate-position", "https://github.com/WeakAuras/WeakAuras2/wiki/Custom-Code-Blocks#translate-position",
59.3, hideMainTranslate, {"animation", "main", "translateFunc"}, false, mainCodeOptions); 59.3, hideMainTranslate, {"animation", "main", "translateFunc"}, false, mainCodeOptions);
local function hideMainScale() local function hideMainScale()
return data.animation.main.type ~= "custom" return data.animation.main.type ~= "custom"
or data.animation.main.scaleType ~= "custom" or data.animation.main.scaleType ~= "custom"
or not (data.animation.main.use_scale and OptionsPrivate.Private.EnsureRegion(id).Scale) or not (data.animation.main.use_scale and OptionsPrivate.Private.EnsureRegion(id).Scale)
end end
OptionsPrivate.commonOptions.AddCodeOption(animation.args, data, L["Custom Function"], "main_scaleFunc", OptionsPrivate.commonOptions.AddCodeOption(animation.args, data, L["Custom Function"], "main_scaleFunc",
"https://github.com/WeakAuras/WeakAuras2/wiki/Custom-Code-Blocks#scale-sizes", "https://github.com/WeakAuras/WeakAuras2/wiki/Custom-Code-Blocks#scale-sizes",
63.3, hideMainScale, {"animation", "main", "scaleFunc"}, false, mainCodeOptions); 63.3, hideMainScale, {"animation", "main", "scaleFunc"}, false, mainCodeOptions);
local function hideMainRotateFunc() local function hideMainRotateFunc()
@@ -993,44 +994,44 @@ function OptionsPrivate.GetAnimationOptions(data)
or not (data.animation.main.use_rotate and OptionsPrivate.Private.EnsureRegion(id).Rotate) or not (data.animation.main.use_rotate and OptionsPrivate.Private.EnsureRegion(id).Rotate)
end end
OptionsPrivate.commonOptions.AddCodeOption(animation.args, data, L["Custom Function"], "main_rotateFunc", OptionsPrivate.commonOptions.AddCodeOption(animation.args, data, L["Custom Function"], "main_rotateFunc",
"https://github.com/WeakAuras/WeakAuras2/wiki/Custom-Code-Blocks#rotate", "https://github.com/WeakAuras/WeakAuras2/wiki/Custom-Code-Blocks#rotate",
67.3, hideMainRotateFunc, {"animation", "main", "rotateFunc"}, false, mainCodeOptions); 67.3, hideMainRotateFunc, {"animation", "main", "rotateFunc"}, false, mainCodeOptions);
local function hideMainColorFunc() local function hideMainColorFunc()
return data.animation.main.type ~= "custom" return data.animation.main.type ~= "custom"
or data.animation.main.colorType ~= "custom" or data.animation.main.colorType ~= "custom"
or not (data.animation.main.use_color and OptionsPrivate.Private.EnsureRegion(id).Color) or not (data.animation.main.use_color and OptionsPrivate.Private.EnsureRegion(id).Color)
end end
OptionsPrivate.commonOptions.AddCodeOption(animation.args, data, L["Custom Function"], "main_colorFunc", OptionsPrivate.commonOptions.AddCodeOption(animation.args, data, L["Custom Function"], "main_colorFunc",
"https://github.com/WeakAuras/WeakAuras2/wiki/Custom-Code-Blocks#color", "https://github.com/WeakAuras/WeakAuras2/wiki/Custom-Code-Blocks#color",
68.7, hideMainColorFunc, {"animation", "main", "colorFunc"}, false, mainCodeOptions); 68.7, hideMainColorFunc, {"animation", "main", "colorFunc"}, false, mainCodeOptions);
-- Text Editors for "finish" -- Text Editors for "finish"
local function hideFinishAlphaFunc() local function hideFinishAlphaFunc()
return data.animation.finish.type ~= "custom" return data.animation.finish.type ~= "custom"
or data.animation.finish.alphaType ~= "custom" or data.animation.finish.alphaType ~= "custom"
or not data.animation.finish.use_alpha or not data.animation.finish.use_alpha
end end
OptionsPrivate.commonOptions.AddCodeOption(animation.args, data, L["Custom Function"], "finish_alphaFunc", OptionsPrivate.commonOptions.AddCodeOption(animation.args, data, L["Custom Function"], "finish_alphaFunc",
"https://github.com/WeakAuras/WeakAuras2/wiki/Custom-Code-Blocks#alpha-opacity", "https://github.com/WeakAuras/WeakAuras2/wiki/Custom-Code-Blocks#alpha-opacity",
75.3, hideFinishAlphaFunc, {"animation", "finish", "alphaFunc"}, false); 75.3, hideFinishAlphaFunc, {"animation", "finish", "alphaFunc"}, false);
local function hideFinishTranslate() local function hideFinishTranslate()
return data.animation.finish.type ~= "custom" return data.animation.finish.type ~= "custom"
or data.animation.finish.translateType ~= "custom" or data.animation.finish.translateType ~= "custom"
or not data.animation.finish.use_translate or not data.animation.finish.use_translate
end end
OptionsPrivate.commonOptions.AddCodeOption(animation.args, data, L["Custom Function"], "finish_translateFunc", OptionsPrivate.commonOptions.AddCodeOption(animation.args, data, L["Custom Function"], "finish_translateFunc",
"https://github.com/WeakAuras/WeakAuras2/wiki/Custom-Code-Blocks#translate-position", "https://github.com/WeakAuras/WeakAuras2/wiki/Custom-Code-Blocks#translate-position",
79.3, hideFinishTranslate, {"animation", "finish", "translateFunc"}, false); 79.3, hideFinishTranslate, {"animation", "finish", "translateFunc"}, false);
local function hideFinishScale() local function hideFinishScale()
return data.animation.finish.type ~= "custom" return data.animation.finish.type ~= "custom"
or data.animation.finish.scaleType ~= "custom" or data.animation.finish.scaleType ~= "custom"
or not (data.animation.finish.use_scale and OptionsPrivate.Private.EnsureRegion(id).Scale) or not (data.animation.finish.use_scale and OptionsPrivate.Private.EnsureRegion(id).Scale)
end end
OptionsPrivate.commonOptions.AddCodeOption(animation.args, data, L["Custom Function"], "finish_scaleFunc", OptionsPrivate.commonOptions.AddCodeOption(animation.args, data, L["Custom Function"], "finish_scaleFunc",
"https://github.com/WeakAuras/WeakAuras2/wiki/Custom-Code-Blocks#scale-size", "https://github.com/WeakAuras/WeakAuras2/wiki/Custom-Code-Blocks#scale-size",
83.3, hideFinishScale, {"animation", "finish", "scaleFunc"}, false); 83.3, hideFinishScale, {"animation", "finish", "scaleFunc"}, false);
local function hideFinishRotateFunc() local function hideFinishRotateFunc()
@@ -1039,16 +1040,16 @@ function OptionsPrivate.GetAnimationOptions(data)
or not (data.animation.finish.use_rotate and OptionsPrivate.Private.EnsureRegion(id).Rotate) or not (data.animation.finish.use_rotate and OptionsPrivate.Private.EnsureRegion(id).Rotate)
end end
OptionsPrivate.commonOptions.AddCodeOption(animation.args, data, L["Custom Function"], "finish_rotateFunc", OptionsPrivate.commonOptions.AddCodeOption(animation.args, data, L["Custom Function"], "finish_rotateFunc",
"https://github.com/WeakAuras/WeakAuras2/wiki/Custom-Code-Blocks#rotate", "https://github.com/WeakAuras/WeakAuras2/wiki/Custom-Code-Blocks#rotate",
87.3, hideFinishRotateFunc, {"animation", "finish", "rotateFunc"}, false); 87.3, hideFinishRotateFunc, {"animation", "finish", "rotateFunc"}, false);
local function hideFinishColorFunc() local function hideFinishColorFunc()
return data.animation.finish.type ~= "custom" return data.animation.finish.type ~= "custom"
or data.animation.finish.colorType ~= "custom" or data.animation.finish.colorType ~= "custom"
or not (data.animation.finish.use_color and OptionsPrivate.Private.EnsureRegion(id).Color) or not (data.animation.finish.use_color and OptionsPrivate.Private.EnsureRegion(id).Color)
end end
OptionsPrivate.commonOptions.AddCodeOption(animation.args, data, L["Custom Function"], "finish_colorFunc", OptionsPrivate.commonOptions.AddCodeOption(animation.args, data, L["Custom Function"], "finish_colorFunc",
"https://github.com/WeakAuras/WeakAuras2/wiki/Custom-Code-Blocks#color", "https://github.com/WeakAuras/WeakAuras2/wiki/Custom-Code-Blocks#color",
88.7, hideFinishColorFunc, {"animation", "finish", "colorFunc"}, false); 88.7, hideFinishColorFunc, {"animation", "finish", "colorFunc"}, false);
if(data.controlledChildren) then if(data.controlledChildren) then
+3 -2
View File
@@ -138,7 +138,7 @@ local function nameUserDesc(option)
return option.text return option.text
else else
local text = {} local text = {}
for _, optionData in pairs(option.references) do for id, optionData in pairs(option.references) do
local childOption = optionData.options[optionData.index] local childOption = optionData.options[optionData.index]
if childOption.text and childOption.text ~= nil then if childOption.text and childOption.text ~= nil then
tinsert(text, childOption.text) tinsert(text, childOption.text)
@@ -1244,7 +1244,7 @@ typeControlAdders = {
name = WeakAuras.newFeatureString .. name(option, "noMerge", L["Prevent Merging"]), name = WeakAuras.newFeatureString .. name(option, "noMerge", L["Prevent Merging"]),
desc = desc(option, "noMerge", L["If checked, then this group will not merge with other group when selecting multiple auras."]), desc = desc(option, "noMerge", L["If checked, then this group will not merge with other group when selecting multiple auras."]),
order = order(), order = order(),
width = option.groupType == "simple" and WeakAuras.doubleWidth or WeakAuras.normalWidth, width = option.groupType =="simple" and WeakAuras.doubleWidth or WeakAuras.normalWidth,
get = get(option, "noMerge"), get = get(option, "noMerge"),
set = set(data, option, "noMerge"), set = set(data, option, "noMerge"),
} }
@@ -2587,6 +2587,7 @@ local function valuesAreEqual(t1, t2)
return false return false
end end
end end
for k2, v2 in pairs(t2) do for k2, v2 in pairs(t2) do
local v1 = t1[k2] local v1 = t1[k2]
if v1 == nil or not valuesAreEqual(v1, v2) then if v1 == nil or not valuesAreEqual(v1, v2) then
+15 -10
View File
@@ -55,7 +55,7 @@ end
local function IsGroupTrigger(trigger) local function IsGroupTrigger(trigger)
return trigger.unit == "group" or trigger.unit == "raid" or trigger.unit == "party" return trigger.unit == "group" or trigger.unit == "raid" or trigger.unit == "party"
or trigger.unit == "boss" or trigger.unit == "nameplate" or trigger.unit == "arena" or trigger.unit == "multi" or trigger.unit == "boss" or trigger.unit == "nameplate" or trigger.unit == "arena" or trigger.unit == "multi"
end end
local function IsSingleMissing(trigger) local function IsSingleMissing(trigger)
@@ -237,7 +237,6 @@ local function GetBuffTriggerOptions(data, triggernum)
name = L["Unit"], name = L["Unit"],
order = 10, order = 10,
disabled = true, disabled = true,
hidden = function() return not trigger.type == "aura2" end,
get = function() return true end get = function() return true end
}, },
unit = { unit = {
@@ -248,8 +247,7 @@ local function GetBuffTriggerOptions(data, triggernum)
values = function() values = function()
return OptionsPrivate.Private.unit_types_bufftrigger_2 return OptionsPrivate.Private.unit_types_bufftrigger_2
end, end,
hidden = function() return not trigger.type == "aura2" end, desc = L["• |cff00ff00Player|r, |cff00ff00Target|r, |cff00ff00Focus|r, and |cff00ff00Pet|r correspond directly to those individual unitIDs.\n• |cff00ff00Specific Unit|r lets you provide a specific valid unitID to watch.\n|cffff0000Note|r: The game will not fire events for all valid unitIDs, making some untrackable by this trigger.\n• |cffffff00Party|r, |cffffff00Raid|r, |cffffff00Boss|r, |cffffff00Arena|r, and |cffffff00Nameplate|r can match multiple corresponding unitIDs.\n• |cffffff00Smart Group|r adjusts to your current group type, matching just the \"player\" when solo, \"party\" units (including \"player\") in a party or \"raid\" units in a raid.\n• |cffffff00Multi-target|r attempts to use the Combat Log events, rather than unitID, to track affected units.\n|cffff0000Note|r: Without a direct relationship to actual unitIDs, results may vary.\n\n|cffffff00*|r Yellow Unit settings can match multiple units and will default to being active even while no affected units are found without a Unit Count or Match Count setting."],
desc = L[" |cff00ff00Player|r, |cff00ff00Target|r, |cff00ff00Focus|r, and |cff00ff00Pet|r correspond directly to those individual unitIDs.\n |cff00ff00Specific Unit|r lets you provide a specific valid unitID to watch.\n|cffff0000Note|r: The game will not fire events for all valid unitIDs, making some untrackable by this trigger.\n |cffffff00Party|r, |cffffff00Raid|r, |cffffff00Boss|r, |cffffff00Arena|r, and |cffffff00Nameplate|r can match multiple corresponding unitIDs.\n |cffffff00Smart Group|r adjusts to your current group type, matching just the \"player\" when solo, \"party\" units (including \"player\") in a party or \"raid\" units in a raid.\n |cffffff00Multi-target|r attempts to use the Combat Log events, rather than unitID, to track affected units.\n|cffff0000Note|r: Without a direct relationship to actual unitIDs, results may vary.\n\n|cffffff00*|r Yellow Unit settings can match multiple units and will default to being active even while no affected units are found without a Unit Count or Match Count setting."],
}, },
useSpecificUnit = { useSpecificUnit = {
type = "toggle", type = "toggle",
@@ -283,7 +281,6 @@ local function GetBuffTriggerOptions(data, triggernum)
name = L["Aura Type"], name = L["Aura Type"],
order = 11, order = 11,
disabled = true, disabled = true,
hidden = function() return not trigger.type == "aura2" end,
get = function() return true end get = function() return true end
}, },
debuffType = { debuffType = {
@@ -292,7 +289,6 @@ local function GetBuffTriggerOptions(data, triggernum)
name = L["Aura Type"], name = L["Aura Type"],
order = 11.1, order = 11.1,
values = OptionsPrivate.Private.debuff_types, values = OptionsPrivate.Private.debuff_types,
hidden = function() return not trigger.type == "aura2" end
}, },
spell_filters_header = { spell_filters_header = {
type = "header", type = "header",
@@ -304,7 +300,7 @@ local function GetBuffTriggerOptions(data, triggernum)
width = WeakAuras.normalWidth, width = WeakAuras.normalWidth,
name = L["Debuff Type"], name = L["Debuff Type"],
order = 11.2, order = 11.2,
desc = L["Filter to only dispellable de/buffs of the given type(s)"], desc = L["Filter to only dispellable de/buffs of the given type(s)\nBleed classification via LibDispel"],
hidden = function() return not (trigger.type == "aura2" and trigger.unit ~= "multi" and CanHaveMatchCheck(trigger)) end hidden = function() return not (trigger.type == "aura2" and trigger.unit ~= "multi" and CanHaveMatchCheck(trigger)) end
}, },
debuffClass = { debuffClass = {
@@ -335,7 +331,6 @@ local function GetBuffTriggerOptions(data, triggernum)
name = L["Name(s)"], name = L["Name(s)"],
order = 12, order = 12,
width = WeakAuras.normalWidth - 0.2, width = WeakAuras.normalWidth - 0.2,
hidden = function() return not trigger.type == "aura2" end
}, },
useNameSpace = { useNameSpace = {
type = "description", type = "description",
@@ -349,7 +344,6 @@ local function GetBuffTriggerOptions(data, triggernum)
name = L["Exact Spell ID(s)"], name = L["Exact Spell ID(s)"],
width = WeakAuras.normalWidth - 0.2, width = WeakAuras.normalWidth - 0.2,
order = 22, order = 22,
hidden = function() return not trigger.type == "aura2" end
}, },
useExactSpellIdSpace = { useExactSpellIdSpace = {
type = "description", type = "description",
@@ -523,7 +517,7 @@ local function GetBuffTriggerOptions(data, triggernum)
}, },
use_stealable = { use_stealable = {
type = "toggle", type = "toggle",
name = function() name = function(input)
local value = trigger.use_stealable local value = trigger.use_stealable
if value == nil then return L["Is Stealable"] if value == nil then return L["Is Stealable"]
elseif value == false then return "|cFFFF0000 " .. L["Negator"] .. " " .. L["Is Stealable"] .. "|r" elseif value == false then return "|cFFFF0000 " .. L["Negator"] .. " " .. L["Is Stealable"] .. "|r"
@@ -674,6 +668,16 @@ local function GetBuffTriggerOptions(data, triggernum)
order = 65.1, order = 65.1,
hidden = function() return not (trigger.type == "aura2" and (trigger.unit == "group" or trigger.unit == "raid" or trigger.unit == "party")) end hidden = function() return not (trigger.type == "aura2" and (trigger.unit == "group" or trigger.unit == "raid" or trigger.unit == "party")) end
}, },
fetchRole = {
type = "toggle",
name = L["Fetch Role Information"],
desc = L["This adds %role, %roleIcon as text replacements. Does nothing if the unit is not a group member."],
order = 65.2,
width = WeakAuras.doubleWidth,
hidden = function()
return not (trigger.type == "aura2" and trigger.unit ~= "multi")
end
},
fetchRaidMark = { fetchRaidMark = {
type = "toggle", type = "toggle",
name = L["Fetch Raid Mark Information"], name = L["Fetch Raid Mark Information"],
@@ -711,6 +715,7 @@ local function GetBuffTriggerOptions(data, triggernum)
and (trigger.unit == "group" or trigger.unit == "raid" or trigger.unit == "party") and not trigger.use_includePets) and (trigger.unit == "group" or trigger.unit == "raid" or trigger.unit == "party") and not trigger.use_includePets)
end end
}, },
useActualSpec = { useActualSpec = {
type = "toggle", type = "toggle",
width = WeakAuras.normalWidth, width = WeakAuras.normalWidth,
+16 -7
View File
@@ -123,7 +123,7 @@ local function addCollapsibleHeader(options, key, input, order, isGroupTab)
end end
local titleWidth = WeakAuras.doubleWidth - (hasAdd and 0.15 or 0) - (hasDelete and 0.15 or 0) - (hasUp and 0.15 or 0) local titleWidth = WeakAuras.doubleWidth - (hasAdd and 0.15 or 0) - (hasDelete and 0.15 or 0) - (hasUp and 0.15 or 0)
- (hasDown and 0.15 or 0) - (hasDuplicate and 0.15 or 0) - (hasApplyTemplate and 0.15 or 0) - (hasDynamicTextCodes and 0.15 or 0) - (hasDown and 0.15 or 0) - (hasDuplicate and 0.15 or 0) - (hasApplyTemplate and 0.15 or 0) - (hasDynamicTextCodes and 0.15 or 0)
options[key .. "collapseSpacer"] = { options[key .. "collapseSpacer"] = {
type = marginTop and "header" or "description", type = marginTop and "header" or "description",
@@ -759,7 +759,6 @@ local function replaceNameDescFuncs(intable, data, subOption)
display = math.floor(display * 100) / 100; display = math.floor(display * 100) / 100;
else else
local nullBytePos = display:find("\0", nil, true) local nullBytePos = display:find("\0", nil, true)
if nullBytePos then if nullBytePos then
display = display:sub(1, nullBytePos - 1) display = display:sub(1, nullBytePos - 1)
end end
@@ -824,6 +823,13 @@ local function replaceImageFuncs(intable, data, subOption)
recurse(intable); recurse(intable);
end end
local concatenableTypes = {
string = true,
number = true
}
local function isConcatenableValue(value)
return value and concatenableTypes[type(value)]
end
local function replaceValuesFuncs(intable, data, subOption) local function replaceValuesFuncs(intable, data, subOption)
local function valuesAll(info) local function valuesAll(info)
local combinedValues = {}; local combinedValues = {};
@@ -854,7 +860,9 @@ local function replaceValuesFuncs(intable, data, subOption)
-- Already known key/value pair -- Already known key/value pair
else else
if (combinedValues[k]) then if (combinedValues[k]) then
combinedValues[k] = combinedValues[k] .. "/" .. v; if isConcatenableValue(k) and isConcatenableValue(v) then
combinedValues[k] = combinedValues[k] .. "/" .. v;
end
else else
combinedValues[k] = v; combinedValues[k] = v;
end end
@@ -1390,6 +1398,7 @@ local function PositionOptions(id, data, _, hideWidthHeight, disableSelfPoint, g
}, },
anchorFramePoints = { anchorFramePoints = {
type = "execute", type = "execute",
width = WeakAuras.normalWidth,
name = "", name = "",
order = 78, order = 78,
image = function() return "", 0, 0 end, image = function() return "", 0, 0 end,
@@ -1400,9 +1409,9 @@ local function PositionOptions(id, data, _, hideWidthHeight, disableSelfPoint, g
xOffset = { xOffset = {
type = "range", type = "range",
control = "WeakAurasSpinBox", control = "WeakAurasSpinBox",
width = WeakAuras.normalWidth,
name = L["X Offset"], name = L["X Offset"],
order = 79, order = 79,
width = WeakAuras.normalWidth,
softMin = (-1 * screenWidth), softMin = (-1 * screenWidth),
min = (-4 * screenWidth), min = (-4 * screenWidth),
softMax = screenWidth, softMax = screenWidth,
@@ -1420,9 +1429,9 @@ local function PositionOptions(id, data, _, hideWidthHeight, disableSelfPoint, g
yOffset = { yOffset = {
type = "range", type = "range",
control = "WeakAurasSpinBox", control = "WeakAurasSpinBox",
width = WeakAuras.normalWidth,
name = L["Y Offset"], name = L["Y Offset"],
order = 80, order = 80,
width = WeakAuras.normalWidth,
softMin = (-1 * screenHeight), softMin = (-1 * screenHeight),
min = (-4 * screenHeight), min = (-4 * screenHeight),
softMax = screenHeight, softMax = screenHeight,
@@ -1911,7 +1920,7 @@ local function AddCodeOption(args, data, name, prefix, url, order, hiddenFunc, p
OptionsPrivate.ClearOptions(data.id) OptionsPrivate.ClearOptions(data.id)
end end
end, end,
get = function() get = function(info)
return GetCustomCode(data, path); return GetCustomCode(data, path);
end end
}; };
@@ -1995,7 +2004,7 @@ local function AddCommonTriggerOptions(options, data, triggernum, doubleWidth)
order = 1.1, order = 1.1,
values = trigger_types, values = trigger_types,
sorting = OptionsPrivate.Private.SortOrderForValues(trigger_types), sorting = OptionsPrivate.Private.SortOrderForValues(trigger_types),
get = function(info) get = function()
return trigger.type return trigger.type
end, end,
set = function(info, v) set = function(info, v)
+17 -16
View File
@@ -73,17 +73,17 @@ local function compareValues(a, b, propertytype)
and a[2] == b[2] and a[2] == b[2]
and a[3] == b[3] and a[3] == b[3]
and a[4] == b[4]; and a[4] == b[4];
elseif propertytype == "progressSource" then elseif propertytype == "progressSource" then
if type(a) == "table" and type(b) == "table" then if type(a) == "table" and type(b) == "table" then
local triggerA, propertyA, triggerB, propertyB = a[1], a[2], b[1], b[2] local triggerA, propertyA, triggerB, propertyB = a[1], a[2], b[1], b[2]
if triggerA ~= triggerB or propertyA ~= propertyB then if triggerA ~= triggerB or propertyA ~= propertyB then
return false return false
end
if triggerA == 0 then
return a[3] == b[3] and a[4] == b[4]
end
return true
end end
if triggerA == 0 then
return a[3] == b[3] and a[4] == b[4]
end
return true
end
end end
return a == b; return a == b;
end end
@@ -223,7 +223,6 @@ end
--- a sound from each setter --- a sound from each setter
local lastPlayedSoundFromSet local lastPlayedSoundFromSet
local function wrapWithPlaySound(func, kit) local function wrapWithPlaySound(func, kit)
return function(info, v) return function(info, v)
func(info, v); func(info, v);
@@ -380,11 +379,7 @@ local function addControlsForChange(args, order, data, conditionVariable, totalA
conditions[i].changes[j].value[4] = a; conditions[i].changes[j].value[4] = a;
WeakAuras.ClearAndUpdateOptions(data.id) WeakAuras.ClearAndUpdateOptions(data.id)
end end
setValueTable = function(info, v)
conditions[i].changes[j].value = CopyTable(v)
WeakAuras.Add(data)
WeakAuras.ClearAndUpdateOptions(data.id)
end
setValueComplex = function(property) setValueComplex = function(property)
return function(info, v) return function(info, v)
for id, reference in pairs(conditions[i].changes[j].references) do for id, reference in pairs(conditions[i].changes[j].references) do
@@ -442,6 +437,11 @@ local function addControlsForChange(args, order, data, conditionVariable, totalA
WeakAuras.Add(data); WeakAuras.Add(data);
WeakAuras.ClearAndUpdateOptions(data.id) WeakAuras.ClearAndUpdateOptions(data.id)
end end
setValueTable = function(info, v)
conditions[i].changes[j].value = CopyTable(v)
WeakAuras.Add(data)
WeakAuras.ClearAndUpdateOptions(data.id)
end
setValueColor = function(info, r, g, b, a) setValueColor = function(info, r, g, b, a)
conditions[i].changes[j].value = conditions[i].changes[j].value or {}; conditions[i].changes[j].value = conditions[i].changes[j].value or {};
conditions[i].changes[j].value[1] = r; conditions[i].changes[j].value[1] = r;
@@ -625,6 +625,7 @@ local function addControlsForChange(args, order, data, conditionVariable, totalA
WeakAuras.Mixin(statusbarList, SharedMedia:HashTable("statusbar")) WeakAuras.Mixin(statusbarList, SharedMedia:HashTable("statusbar"))
values = statusbarList values = statusbarList
end end
args["condition" .. i .. "value" .. j] = { args["condition" .. i .. "value" .. j] = {
type = "select", type = "select",
width = WeakAuras.normalWidth, width = WeakAuras.normalWidth,
+18 -10
View File
@@ -121,7 +121,7 @@ local function GetCustomTriggerOptions(data, triggernum)
end end
elseif trueEvent:match("^UNIT_") then elseif trueEvent:match("^UNIT_") then
local unit = string.lower(i) local unit = string.lower(i)
if not ((OptionsPrivate.Private.baseUnitId[unit] and OptionsPrivate.Private.multiUnitId[unit]) or unit ~= "nameplate") then if not OptionsPrivate.Private.baseUnitId[unit] and not OptionsPrivate.Private.multiUnitId[unit] then
return "|cFFFF0000"..L["Unit %s is not a valid unit for RegisterUnitEvent"]:format(unit) return "|cFFFF0000"..L["Unit %s is not a valid unit for RegisterUnitEvent"]:format(unit)
end end
elseif trueEvent == "TRIGGER" then elseif trueEvent == "TRIGGER" then
@@ -169,7 +169,7 @@ local function GetCustomTriggerOptions(data, triggernum)
end end
elseif trueEvent:match("^UNIT_") then elseif trueEvent:match("^UNIT_") then
local unit = string.lower(i) local unit = string.lower(i)
if not (OptionsPrivate.Private.baseUnitId[unit] or unit ~= "nameplate") then if not OptionsPrivate.Private.baseUnitId[unit] then
return false return false
end end
elseif trueEvent == "TRIGGER" then elseif trueEvent == "TRIGGER" then
@@ -403,14 +403,22 @@ local function GetCustomTriggerOptions(data, triggernum)
17 + i / 10, hideOverlay, appendToTriggerPath("customOverlay" .. i), false, { multipath = false, extraSetFunction = extraSetFunctionReload, extraFunctions = extraFunctions}); 17 + i / 10, hideOverlay, appendToTriggerPath("customOverlay" .. i), false, { multipath = false, extraSetFunction = extraSetFunctionReload, extraFunctions = extraFunctions});
end end
OptionsPrivate.commonOptions.AddCodeOption(customOptions, data, L["Name Info"], "custom_name", "https://github.com/WeakAuras/WeakAuras2/wiki/Custom-Code-Blocks#name-info", OptionsPrivate.commonOptions.AddCodeOption(customOptions, data, L["Name Info"], "custom_name",
18, hideIfTriggerStateUpdate, appendToTriggerPath("customName"), false, { multipath = false, extraSetFunction = extraSetFunctionReload}); "https://github.com/WeakAuras/WeakAuras2/wiki/Custom-Code-Blocks#name-info",
OptionsPrivate.commonOptions.AddCodeOption(customOptions, data, L["Icon Info"], "custom_icon", "https://github.com/WeakAuras/WeakAuras2/wiki/Custom-Code-Blocks#icon-info", 18, hideIfTriggerStateUpdate, appendToTriggerPath("customName"), false,
20, hideIfTriggerStateUpdate, appendToTriggerPath("customIcon"), false, { multipath = false, extraSetFunction = extraSetFunction}); { multipath = false, extraSetFunction = extraSetFunctionReload});
OptionsPrivate.commonOptions.AddCodeOption(customOptions, data, L["Texture Info"], "custom_texture", "https://github.com/WeakAuras/WeakAuras2/wiki/Custom-Code-Blocks#texture-info", OptionsPrivate.commonOptions.AddCodeOption(customOptions, data, L["Icon Info"], "custom_icon",
22, hideIfTriggerStateUpdate, appendToTriggerPath("customTexture"), false, { multipath = false, extraSetFunction = extraSetFunction}); "https://github.com/WeakAuras/WeakAuras2/wiki/Custom-Code-Blocks#icon-info",
OptionsPrivate.commonOptions.AddCodeOption(customOptions, data, L["Stack Info"], "custom_stacks", "https://github.com/WeakAuras/WeakAuras2/wiki/Custom-Code-Blocks#stack-info", 20, hideIfTriggerStateUpdate, appendToTriggerPath("customIcon"), false,
23, hideIfTriggerStateUpdate, appendToTriggerPath("customStacks"), false, { multipath = false, extraSetFunction = extraSetFunctionReload}); { multipath = false, extraSetFunction = extraSetFunction});
OptionsPrivate.commonOptions.AddCodeOption(customOptions, data, L["Texture Info"], "custom_texture",
"https://github.com/WeakAuras/WeakAuras2/wiki/Custom-Code-Blocks#texture-info",
22, hideIfTriggerStateUpdate, appendToTriggerPath("customTexture"), false,
{ multipath = false, extraSetFunction = extraSetFunction});
OptionsPrivate.commonOptions.AddCodeOption(customOptions, data, L["Stack Info"], "custom_stacks",
"https://github.com/WeakAuras/WeakAuras2/wiki/Custom-Code-Blocks#stack-info",
23, hideIfTriggerStateUpdate, appendToTriggerPath("customStacks"), false,
{ multipath = false, extraSetFunction = extraSetFunctionReload});
return customOptions; return customOptions;
end end
+5
View File
@@ -332,6 +332,7 @@ function OptionsPrivate.GetInformationOptions(data)
order = order, order = order,
} }
order = order + 1 order = order + 1
args.debugLogDesc = { args.debugLogDesc = {
type = "description", type = "description",
name = L["This enables the collection of debug logs. Custom code can add debug information to the log through the function DebugPrint."], name = L["This enables the collection of debug logs. Custom code can add debug information to the log through the function DebugPrint."],
@@ -358,6 +359,7 @@ function OptionsPrivate.GetInformationOptions(data)
end end
end end
end end
args.debugLogToggle = { args.debugLogToggle = {
type = "toggle", type = "toggle",
name = sameDebugLog and L["Enable Debug Logging"] or "|cFF4080FF" .. L["Enable Debug Logging"], name = sameDebugLog and L["Enable Debug Logging"] or "|cFF4080FF" .. L["Enable Debug Logging"],
@@ -378,10 +380,12 @@ function OptionsPrivate.GetInformationOptions(data)
OptionsPrivate.ClearOptions(child.id) OptionsPrivate.ClearOptions(child.id)
end end
end end
WeakAuras.ClearAndUpdateOptions(data.id) WeakAuras.ClearAndUpdateOptions(data.id)
end end
} }
order = order + 1 order = order + 1
if not sameDebugLog or commonDebugLog then if not sameDebugLog or commonDebugLog then
args.debugLogShow = { args.debugLogShow = {
type = "execute", type = "execute",
@@ -425,6 +429,7 @@ function OptionsPrivate.GetInformationOptions(data)
end end
} }
order = order + 1 order = order + 1
args.debugLogClear = { args.debugLogClear = {
type = "execute", type = "execute",
name = L["Clear Debug Logs"], name = L["Clear Debug Logs"],
+6 -1
View File
@@ -364,7 +364,11 @@ function OptionsPrivate.ConstructOptions(prototype, data, startorder, triggernum
options["use_"..name].desc = arg.desc; options["use_"..name].desc = arg.desc;
end end
if(arg.required) then if(arg.required) then
trigger["use_"..realname] = true; if arg.type == "multiselect" and arg.multiNoSingle then
trigger["use_"..realname] = false
else
trigger["use_"..realname] = true
end
if not(triggertype) then if not(triggertype) then
options["use_"..name].disabled = true; options["use_"..name].disabled = true;
else else
@@ -438,6 +442,7 @@ function OptionsPrivate.ConstructOptions(prototype, data, startorder, triggernum
values = arg.operator_types == "without_equal" and OptionsPrivate.Private.operator_types_without_equal values = arg.operator_types == "without_equal" and OptionsPrivate.Private.operator_types_without_equal
or arg.operator_types == "only_equal" and OptionsPrivate.Private.equality_operator_types or arg.operator_types == "only_equal" and OptionsPrivate.Private.equality_operator_types
or OptionsPrivate.Private.operator_types, or OptionsPrivate.Private.operator_types,
get = function() get = function()
return getValue(trigger, "use_"..realname, realname.."_operator", multiEntry, entryNumber) return getValue(trigger, "use_"..realname, realname.."_operator", multiEntry, entryNumber)
end, end,
+28 -20
View File
@@ -456,10 +456,22 @@ StaticPopupDialogs["WEAKAURAS_CONFIRM_DELETE"] = {
} }
function OptionsPrivate.IsWagoUpdateIgnored(auraId) function OptionsPrivate.IsWagoUpdateIgnored(auraId)
local auraData = WeakAuras.GetData(auraId)
if auraData then
for child in OptionsPrivate.Private.TraverseAll(auraData) do
if child.ignoreWagoUpdate then
return true
end
end
end
return false
end
function OptionsPrivate.HasWagoUrl(auraId)
local auraData = WeakAuras.GetData(auraId) local auraData = WeakAuras.GetData(auraId)
if auraData then if auraData then
for child in OptionsPrivate.Private.TraverseAll(auraData) do for child in OptionsPrivate.Private.TraverseAll(auraData) do
if child.ignoreWagoUpdate then if child.url and child.url ~= "" then
return true return true
end end
end end
@@ -467,18 +479,6 @@ function OptionsPrivate.IsWagoUpdateIgnored(auraId)
return false return false
end end
function OptionsPrivate.HasWagoUrl(auraId)
local auraData = WeakAuras.GetData(auraId)
if auraData then
for child in OptionsPrivate.Private.TraverseAll(auraData) do
if child.url and child.url ~= "" then
return true
end
end
end
return false
end
function OptionsPrivate.ConfirmDelete(toDelete, parents) function OptionsPrivate.ConfirmDelete(toDelete, parents)
if toDelete then if toDelete then
local warningForm = L["You are about to delete %d aura(s). |cFFFF0000This cannot be undone!|r Would you like to continue?"] local warningForm = L["You are about to delete %d aura(s). |cFFFF0000This cannot be undone!|r Would you like to continue?"]
@@ -801,6 +801,7 @@ function OptionsPrivate.DeleteAuras(auras, parents)
parentButton:SetNormalTooltip() parentButton:SetNormalTooltip()
WeakAuras.Add(parentData) WeakAuras.Add(parentData)
WeakAuras.ClearAndUpdateOptions(parentData.id) WeakAuras.ClearAndUpdateOptions(parentData.id)
parentButton:UpdateParentWarning()
frame.loadProgress:SetText(L["Finishing..."]) frame.loadProgress:SetText(L["Finishing..."])
coroutine.yield() coroutine.yield()
end end
@@ -887,6 +888,7 @@ function WeakAuras.ShowOptions(msg)
if firstLoad then if firstLoad then
frame:ShowTip() frame:ShowTip()
end end
end end
function OptionsPrivate.UpdateOptions() function OptionsPrivate.UpdateOptions()
@@ -1407,7 +1409,10 @@ function OptionsPrivate.StartGrouping(data)
end end
for id, button in pairs(displayButtons) do for id, button in pairs(displayButtons) do
button:StartGrouping({data.id}, data.id == id, data.regionType == "dynamicgroup" or data.regionType == "group", children[id]); button:StartGrouping({data.id},
data.id == id,
data.regionType == "dynamicgroup" or data.regionType == "group",
children[id]);
end end
end end
end end
@@ -1587,7 +1592,7 @@ function OptionsPrivate.StartDrag(mainAura)
children[child.id] = true children[child.id] = true
end end
-- set dragging for non selected buttons -- set dragging for non selected buttons
for _, button in pairs(displayButtons) do for id, button in pairs(displayButtons) do
if not children[button.data.id] then if not children[button.data.id] then
button:DragStart("MULTI", false, mainAura); button:DragStart("MULTI", false, mainAura);
end end
@@ -1603,7 +1608,7 @@ function OptionsPrivate.StartDrag(mainAura)
children[child.id] = true children[child.id] = true
end end
-- set dragging for non selected buttons -- set dragging for non selected buttons
for id, button in pairs(displayButtons) do for _, button in pairs(displayButtons) do
if not children[button.data.id] then if not children[button.data.id] then
button:DragStart(mode, false, mainAura); button:DragStart(mode, false, mainAura);
end end
@@ -1696,7 +1701,6 @@ function OptionsPrivate.OpenModelPicker(baseObject, path)
WeakAuras.prettyPrint(string.format(L["ModelPaths could not be loaded, the addon is %s"], reason)); WeakAuras.prettyPrint(string.format(L["ModelPaths could not be loaded, the addon is %s"], reason));
WeakAuras.ModelPaths = {}; WeakAuras.ModelPaths = {};
end end
OptionsPrivate.ModelPicker(frame).modelTree:SetTree(WeakAuras.ModelPaths) OptionsPrivate.ModelPicker(frame).modelTree:SetTree(WeakAuras.ModelPaths)
end end
OptionsPrivate.ModelPicker(frame):Open(baseObject, path); OptionsPrivate.ModelPicker(frame):Open(baseObject, path);
@@ -2044,7 +2048,8 @@ function OptionsPrivate.MoveCollapseDataUp(id, namespace, path)
collapsedOptions[id] = collapsedOptions[id] or {} collapsedOptions[id] = collapsedOptions[id] or {}
collapsedOptions[id][namespace] = collapsedOptions[id][namespace] or {} collapsedOptions[id][namespace] = collapsedOptions[id][namespace] or {}
if type(path) ~= "table" then if type(path) ~= "table" then
collapsedOptions[id][namespace][path], collapsedOptions[id][namespace][path - 1] = collapsedOptions[id][namespace][path - 1], collapsedOptions[id][namespace][path] collapsedOptions[id][namespace][path], collapsedOptions[id][namespace][path - 1]
= collapsedOptions[id][namespace][path - 1], collapsedOptions[id][namespace][path]
else else
local tmp = collapsedOptions[id][namespace] local tmp = collapsedOptions[id][namespace]
local lastKey = tremove(path) local lastKey = tremove(path)
@@ -2060,7 +2065,8 @@ function OptionsPrivate.MoveCollapseDataDown(id, namespace, path)
collapsedOptions[id] = collapsedOptions[id] or {} collapsedOptions[id] = collapsedOptions[id] or {}
collapsedOptions[id][namespace] = collapsedOptions[id][namespace] or {} collapsedOptions[id][namespace] = collapsedOptions[id][namespace] or {}
if type(path) ~= "table" then if type(path) ~= "table" then
collapsedOptions[id][namespace][path], collapsedOptions[id][namespace][path + 1] = collapsedOptions[id][namespace][path + 1], collapsedOptions[id][namespace][path] collapsedOptions[id][namespace][path], collapsedOptions[id][namespace][path + 1]
= collapsedOptions[id][namespace][path + 1], collapsedOptions[id][namespace][path]
else else
local tmp = collapsedOptions[id][namespace] local tmp = collapsedOptions[id][namespace]
local lastKey = tremove(path) local lastKey = tremove(path)
@@ -2155,7 +2161,8 @@ function OptionsPrivate.DuplicateCollapseData(id, namespace, path)
end end
end end
function OptionsPrivate.AddTextFormatOption(input, withHeader, get, addOption, hidden, setHidden, withoutColor, index, total) function OptionsPrivate.AddTextFormatOption(input, withHeader, get, addOption, hidden, setHidden,
withoutColor, index, total)
local headerOption local headerOption
if withHeader and (not index or index == 1) then if withHeader and (not index or index == 1) then
headerOption = { headerOption = {
@@ -2182,6 +2189,7 @@ function OptionsPrivate.AddTextFormatOption(input, withHeader, get, addOption, h
local seenSymbols = {} local seenSymbols = {}
local parseFn = function(symbol) local parseFn = function(symbol)
if not seenSymbols[symbol] then if not seenSymbols[symbol] then
local _, sym = string.match(symbol, "(.+)%.(.+)") local _, sym = string.match(symbol, "(.+)%.(.+)")