from retail
This commit is contained in:
@@ -18,6 +18,8 @@ local self_point_types = {
|
||||
AUTO = L["Automatic"]
|
||||
}
|
||||
|
||||
local dynamicTextInputs = {}
|
||||
|
||||
local function createOptions(parentData, data, index, subIndex)
|
||||
-- The toggles for font flags is intentionally not keyed on the id
|
||||
-- So that all auras share the state of that toggle
|
||||
@@ -45,17 +47,39 @@ local function createOptions(parentData, data, index, subIndex)
|
||||
},
|
||||
text_text = {
|
||||
type = "input",
|
||||
width = WeakAuras.normalWidth,
|
||||
desc = function()
|
||||
return L["Dynamic text tooltip"] .. OptionsPrivate.Private.GetAdditionalProperties(parentData)
|
||||
end,
|
||||
width = WeakAuras.normalWidth - 0.15,
|
||||
name = L["Display Text"],
|
||||
order = 11,
|
||||
set = function(info, v)
|
||||
data.text_text = OptionsPrivate.Private.ReplaceLocalizedRaidMarkers(v)
|
||||
WeakAuras.Add(parentData)
|
||||
WeakAuras.ClearAndUpdateOptions(parentData.id)
|
||||
end
|
||||
end,
|
||||
control = "WeakAurasInput",
|
||||
callbacks = {
|
||||
OnEditFocusGained = function(self)
|
||||
local widget = dynamicTextInputs[subIndex]
|
||||
OptionsPrivate.ToggleTextReplacements(parentData, true, widget)
|
||||
end,
|
||||
OnShow = function(self)
|
||||
dynamicTextInputs[subIndex] = self
|
||||
end,
|
||||
}
|
||||
},
|
||||
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 = 11.1,
|
||||
func = function()
|
||||
local widget = dynamicTextInputs[subIndex]
|
||||
OptionsPrivate.ToggleTextReplacements(parentData, nil, widget)
|
||||
end,
|
||||
imageWidth = 24,
|
||||
imageHeight = 24,
|
||||
control = "WeakAurasIcon",
|
||||
image = "Interface\\AddOns\\WeakAuras\\Media\\Textures\\sidebar",
|
||||
},
|
||||
text_font = {
|
||||
type = "select",
|
||||
|
||||
Reference in New Issue
Block a user