from retail
This commit is contained in:
@@ -241,6 +241,8 @@ local function wrapWithPlaySound(func, kit)
|
||||
end
|
||||
end
|
||||
|
||||
local dynamicTextInputs = {}
|
||||
|
||||
local function addControlsForChange(args, order, data, conditionVariable, totalAuraCount, conditions, i, j, allProperties, usedProperties)
|
||||
local thenText = (j == 1) and L["Then "] or L["And "];
|
||||
local display = isSubset(data, conditions[i].changes[j], totalAuraCount) and allProperties.displayWithCopy or allProperties.display;
|
||||
@@ -917,16 +919,10 @@ local function addControlsForChange(args, order, data, conditionVariable, totalA
|
||||
}
|
||||
order = order + 1;
|
||||
|
||||
local descMessage = descIfNoValue2(data, conditions[i].changes[j], "value", "message", propertyType);
|
||||
if (not descMessage and data ~= OptionsPrivate.tempGroup) then
|
||||
descMessage = L["Dynamic text tooltip"] .. OptionsPrivate.Private.GetAdditionalProperties(data)
|
||||
end
|
||||
|
||||
args["condition" .. i .. "value" .. j .. "message dest"] = {
|
||||
type = "input",
|
||||
width = WeakAuras.normalWidth,
|
||||
width = WeakAuras.normalWidth - 0.15,
|
||||
name = blueIfNoValue2(data, conditions[i].changes[j], "value", "message_dest", L["Send To"], L["Send To"]),
|
||||
desc = descMessage,
|
||||
order = order,
|
||||
get = function()
|
||||
return type(conditions[i].changes[j].value) == "table" and conditions[i].changes[j].value.message_dest;
|
||||
@@ -934,7 +930,37 @@ local function addControlsForChange(args, order, data, conditionVariable, totalA
|
||||
set = setValueComplex("message_dest"),
|
||||
hidden = function()
|
||||
return not anyMessageType("WHISPER");
|
||||
end
|
||||
end,
|
||||
control = "WeakAurasInput",
|
||||
callbacks = {
|
||||
OnEditFocusGained = function(self)
|
||||
local widget = dynamicTextInputs["condition" .. i .. "value" .. j .. "message dest"]
|
||||
OptionsPrivate.ToggleTextReplacements(data, true, widget)
|
||||
end,
|
||||
OnShow = function(self)
|
||||
dynamicTextInputs["condition" .. i .. "value" .. j .. "message dest"] = self
|
||||
end,
|
||||
}
|
||||
}
|
||||
order = order + 1;
|
||||
|
||||
args["condition" .. i .. "value" .. j .. "message dest_text_replacements_button"] = {
|
||||
type = "execute",
|
||||
width = 0.15,
|
||||
name = L["Dynamic Text Replacements"],
|
||||
desc = L["There are several special codes available to make this text dynamic. Click to view a list with all dynamic text codes."],
|
||||
order = order,
|
||||
hidden = function()
|
||||
return not anyMessageType("WHISPER");
|
||||
end,
|
||||
func = function()
|
||||
local widget = dynamicTextInputs["condition" .. i .. "value" .. j .. "message dest"]
|
||||
OptionsPrivate.ToggleTextReplacements(data, nil, widget)
|
||||
end,
|
||||
imageWidth = 24,
|
||||
imageHeight = 24,
|
||||
control = "WeakAurasIcon",
|
||||
image = "Interface\\AddOns\\WeakAuras\\Media\\Textures\\sidebar",
|
||||
}
|
||||
order = order + 1;
|
||||
|
||||
@@ -960,12 +986,38 @@ local function addControlsForChange(args, order, data, conditionVariable, totalA
|
||||
|
||||
args["condition" .. i .. "value" .. j .. "message"] = {
|
||||
type = "input",
|
||||
width = WeakAuras.doubleWidth,
|
||||
width = WeakAuras.doubleWidth - 0.15,
|
||||
name = blueIfNoValue2(data, conditions[i].changes[j], "value", "message", L["Message"], L["Message"]),
|
||||
desc = descMessage,
|
||||
order = order,
|
||||
get = message_getter,
|
||||
set = setValueComplex("message")
|
||||
set = setValueComplex("message"),
|
||||
control = "WeakAurasInput",
|
||||
callbacks = {
|
||||
OnEditFocusGained = function(self)
|
||||
local widget = dynamicTextInputs["condition" .. i .. "value" .. j .. "message"]
|
||||
OptionsPrivate.ToggleTextReplacements(data, true, widget)
|
||||
end,
|
||||
OnShow = function(self)
|
||||
dynamicTextInputs["condition" .. i .. "value" .. j .. "message"] = self
|
||||
end,
|
||||
}
|
||||
}
|
||||
order = order + 1;
|
||||
|
||||
args["condition" .. i .. "value" .. j .. "message_text_replacements_button"] = {
|
||||
type = "execute",
|
||||
width = 0.15,
|
||||
name = L["Dynamic Text Replacements"],
|
||||
desc = L["There are several special codes available to make this text dynamic. Click to view a list with all dynamic text codes."],
|
||||
order = order,
|
||||
func = function()
|
||||
local widget = dynamicTextInputs["condition" .. i .. "value" .. j .. "message"]
|
||||
OptionsPrivate.ToggleTextReplacements(data, nil, widget)
|
||||
end,
|
||||
imageWidth = 24,
|
||||
imageHeight = 24,
|
||||
control = "WeakAurasIcon",
|
||||
image = "Interface\\AddOns\\WeakAuras\\Media\\Textures\\sidebar",
|
||||
}
|
||||
order = order + 1;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user