This commit is contained in:
Bunny67
2020-09-06 19:32:35 +03:00
parent d7d1b8b472
commit 6a1e56cfba
5 changed files with 78 additions and 4 deletions
+40
View File
@@ -1084,6 +1084,16 @@ WeakAuras.event_prototypes = {
store = true,
conditionType = "select"
},
{
name = "ignoreSelf",
display = L["Ignore Self"],
type = "toggle",
width = WeakAuras.doubleWidth,
enable = function(trigger)
return trigger.unit == "group" or trigger.unit == "raid" or trigger.unit == "party"
end,
init = "not UnitIsUnit(\"player\", unit)"
},
{
name = "ignoreDead",
display = L["Ignore Dead"],
@@ -1284,6 +1294,16 @@ WeakAuras.event_prototypes = {
store = true,
conditionType = "select"
},
{
name = "ignoreSelf",
display = L["Ignore Self"],
type = "toggle",
width = WeakAuras.doubleWidth,
enable = function(trigger)
return trigger.unit == "group" or trigger.unit == "raid" or trigger.unit == "party"
end,
init = "not UnitIsUnit(\"player\", unit)"
},
{
name = "ignoreDead",
display = L["Ignore Dead"],
@@ -1492,6 +1512,16 @@ WeakAuras.event_prototypes = {
store = true,
conditionType = "select"
},
{
name = "ignoreSelf",
display = L["Ignore Self"],
type = "toggle",
width = WeakAuras.doubleWidth,
enable = function(trigger)
return trigger.unit == "group" or trigger.unit == "raid" or trigger.unit == "party"
end,
init = "not UnitIsUnit(\"player\", unit)"
},
{
name = "ignoreDead",
display = L["Ignore Dead"],
@@ -4933,6 +4963,16 @@ WeakAuras.event_prototypes = {
return not trigger.use_inverse
end
},
{
name = "ignoreSelf",
display = L["Ignore Self"],
type = "toggle",
width = WeakAuras.doubleWidth,
enable = function(trigger)
return trigger.unit == "group" or trigger.unit == "raid" or trigger.unit == "party"
end,
init = "not UnitIsUnit(\"player\", unit)"
},
{
name = "sourceUnit",
init = "unit",
+33
View File
@@ -120,6 +120,39 @@ WeakAuras.format_types = {
AddOptions = function() end,
CreateFormatter = function() end
},
string = {
display = L["String"],
AddOptions = function(symbol, hidden, addOption, get)
addOption(symbol .. "_abbreviate", {
type = "toggle",
name = L["Abbreviate"],
width = WeakAuras.normalWidth,
hidden = hidden,
})
addOption(symbol .. "_abbreviate_max", {
type = "range",
name = L["Max Char "],
width = WeakAuras.normalWidth,
min = 1,
max = 20,
hidden = hidden,
step = 1,
disabled = function()
return not get(symbol .. "_abbreviate")
end
})
end,
CreateFormatter = function(symbol, get)
local abbreviate = get(symbol .. "_abbreviate", false)
local abbreviateMax = get(symbol .. "_abbreviate_max", 8)
if abbreviate then
return function(input)
return WeakAuras.WA_Utf8Sub(input, abbreviateMax)
end
end
return nil
end
},
timed = {
display = L["Time Format"],
AddOptions = function(symbol, hidden, addOption, get)
+2 -2
View File
@@ -1699,7 +1699,7 @@ local function addControlsForIfLine(args, order, data, conditionVariable, condit
end
tinsert(multipath[id], "value")
end
WeakAuras.OpenTextEditor(data, multipath, nil, true, nil, nil, "https://github.com/WeakAuras/WeakAuras2/wiki/Custom-Code-Blocks#chat-message---custom-code-1");
WeakAuras.OpenTextEditor(data, multipath, nil, true, nil, nil, "https://github.com/WeakAuras/WeakAuras2/wiki/Custom-Code-Blocks#custom-check");
else
for i, v in ipairs(path) do
print(i, v)
@@ -1712,7 +1712,7 @@ local function addControlsForIfLine(args, order, data, conditionVariable, condit
end
tinsert(fullPath, "value")
WeakAuras.OpenTextEditor(data, fullPath, nil, nil, nil, nil, "https://github.com/WeakAuras/WeakAuras2/wiki/Custom-Code-Blocks#chat-message---custom-code-1");
WeakAuras.OpenTextEditor(data, fullPath, nil, nil, nil, nil, "https://github.com/WeakAuras/WeakAuras2/wiki/Custom-Code-Blocks#custom-check");
end
end
}
@@ -615,12 +615,13 @@ function WeakAuras.CreateFrame()
local magnetButton = AceGUI:Create("WeakAurasToolbarButton")
magnetButton:SetText(L["Magnetically Align"])
magnetButton:SetTexture("Interface\\AddOns\\WeakAuras\\Media\\Textures\\magnetic")
magnetButton:SetStrongHighlight(true)
magnetButton:SetCallback("OnClick", function(self)
if WeakAurasOptionsSaved.magnetAlign then
magnetButton:SetStrongHighlight(false)
magnetButton:UnlockHighlight()
WeakAurasOptionsSaved.magnetAlign = false
else
magnetButton:SetStrongHighlight(true)
magnetButton:LockHighlight()
WeakAurasOptionsSaved.magnetAlign = true
end
@@ -401,7 +401,7 @@ local function createOptions(parentData, data, index, subIndex)
type = "description",
name = "",
order = 61,
hidden = hiddenFontExtra,
hidden = hiddenFunction,
control = "WeakAurasExpandAnchor",
arg = {
expanderName = "subtext_anchor" .. index .. "#" .. subIndex