from retail
This commit is contained in:
@@ -466,6 +466,19 @@ local function addControlsForChange(args, order, data, conditionVariable, totalA
|
||||
args["condition" .. i .. "value" .. j].validate = WeakAuras.ValidateNumeric;
|
||||
end
|
||||
end
|
||||
elseif (propertyType == "string") then
|
||||
args["condition" .. i .. "value" .. j] = {
|
||||
type = "input",
|
||||
width = WeakAuras.normalWidth,
|
||||
name = blueIfNoValue(data, conditions[i].changes[j], "value", L["Text"]),
|
||||
desc = descIfNoValue(data, conditions[i].changes[j], "value", propertyType),
|
||||
order = order,
|
||||
get = function()
|
||||
return conditions[i].changes[j].value;
|
||||
end,
|
||||
set = setValue
|
||||
}
|
||||
order = order + 1;
|
||||
elseif (propertyType == "icon") then
|
||||
args["condition" .. i .. "value" .. j] = {
|
||||
type = "input",
|
||||
|
||||
@@ -394,11 +394,28 @@ local function createOptions(parentData, data, index, subIndex)
|
||||
return true
|
||||
end
|
||||
|
||||
for index, subRegion in ipairs(parentData.subRegions) do
|
||||
for _, subRegion in ipairs(parentData.subRegions) do
|
||||
if subRegion.type == "subtext" and OptionsPrivate.Private.ContainsCustomPlaceHolder(subRegion.text_text) then
|
||||
return false
|
||||
end
|
||||
end
|
||||
|
||||
if type(parentData.conditions) == "table" then
|
||||
for _, condition in ipairs(parentData.conditions) do
|
||||
if type(condition.changes) == "table" then
|
||||
for _, change in ipairs(condition.changes) do
|
||||
if type(change.property) == "string"
|
||||
and change.property:match("sub%.%d+%.text_text")
|
||||
and type(change.value) == "string"
|
||||
and OptionsPrivate.Private.ContainsCustomPlaceHolder(change.value)
|
||||
then
|
||||
return false
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
return true
|
||||
end
|
||||
|
||||
|
||||
Reference in New Issue
Block a user