from retail
This commit is contained in:
@@ -63,7 +63,6 @@ local function createOptions(id, data)
|
||||
data.orientation = v;
|
||||
WeakAuras.Add(data);
|
||||
WeakAuras.UpdateThumbnail(data);
|
||||
WeakAuras.SetIconNames(data);
|
||||
WeakAuras.ResetMoverSizer();
|
||||
end
|
||||
},
|
||||
@@ -144,7 +143,6 @@ local function createOptions(id, data)
|
||||
data.displayIcon = v;
|
||||
WeakAuras.Add(data);
|
||||
WeakAuras.UpdateThumbnail(data);
|
||||
WeakAuras.SetIconNames(data);
|
||||
end
|
||||
},
|
||||
chooseIcon = {
|
||||
@@ -178,7 +176,6 @@ local function createOptions(id, data)
|
||||
data.icon_side = v;
|
||||
WeakAuras.Add(data);
|
||||
WeakAuras.UpdateThumbnail(data);
|
||||
WeakAuras.SetIconNames(data);
|
||||
end
|
||||
},
|
||||
desaturate = {
|
||||
@@ -405,7 +402,7 @@ local function createOptions(id, data)
|
||||
|
||||
return {
|
||||
aurabar = options,
|
||||
position = WeakAuras.PositionOptions(id, data),
|
||||
position = WeakAuras.commonOptions.PositionOptions(id, data),
|
||||
};
|
||||
end
|
||||
|
||||
@@ -744,12 +741,12 @@ local function subCreateOptions(parentData, data, index, subIndex)
|
||||
__order = 1,
|
||||
__up = function()
|
||||
if (WeakAuras.ApplyToDataOrChildData(parentData, WeakAuras.MoveSubRegionUp, index, "aurabar_bar")) then
|
||||
WeakAuras.ReloadOptions2(parentData.id, parentData)
|
||||
WeakAuras.ClearAndUpdateOptions(parentData.id)
|
||||
end
|
||||
end,
|
||||
__down = function()
|
||||
if (WeakAuras.ApplyToDataOrChildData(parentData, WeakAuras.MoveSubRegionDown, index, "aurabar_bar")) then
|
||||
WeakAuras.ReloadOptions2(parentData.id, parentData)
|
||||
WeakAuras.ClearAndUpdateOptions(parentData.id, parentData)
|
||||
end
|
||||
end,
|
||||
__nooptions = true
|
||||
|
||||
@@ -90,7 +90,6 @@ local function createOptions(id, data)
|
||||
data.groupIcon = v
|
||||
WeakAuras.Add(data)
|
||||
WeakAuras.UpdateThumbnail(data)
|
||||
WeakAuras.SetIconNames(data)
|
||||
end
|
||||
},
|
||||
chooseIcon = {
|
||||
@@ -115,7 +114,7 @@ local function createOptions(id, data)
|
||||
end
|
||||
data.selfPoint = selfPoint
|
||||
WeakAuras.Add(data)
|
||||
WeakAuras.ReloadTriggerOptions(data)
|
||||
WeakAuras.ClearAndUpdateOptions(data.id)
|
||||
WeakAuras.ResetMoverSizer()
|
||||
end,
|
||||
},
|
||||
@@ -159,7 +158,7 @@ local function createOptions(id, data)
|
||||
end
|
||||
data.selfPoint = selfPoint
|
||||
WeakAuras.Add(data)
|
||||
WeakAuras.ReloadTriggerOptions(data)
|
||||
WeakAuras.ClearAndUpdateOptions(data.id)
|
||||
WeakAuras.ResetMoverSizer()
|
||||
end,
|
||||
hidden = function() return (data.grow == "CUSTOM" or data.grow == "LEFT" or data.grow == "RIGHT" or data.grow == "HORIZONTAL" or data.grow == "CIRCLE" or data.grow == "COUNTERCIRCLE" or data.grow == "GRID") end,
|
||||
@@ -181,7 +180,7 @@ local function createOptions(id, data)
|
||||
end
|
||||
data.selfPoint = selfPoint
|
||||
WeakAuras.Add(data)
|
||||
WeakAuras.ReloadTriggerOptions(data)
|
||||
WeakAuras.ClearAndUpdateOptions(data.id)
|
||||
WeakAuras.ResetMoverSizer()
|
||||
end,
|
||||
},
|
||||
@@ -411,23 +410,23 @@ local function createOptions(id, data)
|
||||
},
|
||||
};
|
||||
|
||||
WeakAuras.AddCodeOption(options, data, L["Custom Grow"], "custom_grow", "https://github.com/WeakAuras/WeakAuras2/wiki/Custom-Dynamic-Group",
|
||||
WeakAuras.commonOptions.AddCodeOption(options, data, L["Custom Grow"], "custom_grow", "https://github.com/WeakAuras/WeakAuras2/wiki/Custom-Code-Blocks#grow",
|
||||
2, function() return data.grow ~= "CUSTOM" end, {"customGrow"}, nil, nil, nil, nil, nil, true)
|
||||
WeakAuras.AddCodeOption(options, data, L["Custom Sort"], "custom_sort", "https://github.com/WeakAuras/WeakAuras2/wiki/Custom-Dynamic-Group",
|
||||
WeakAuras.commonOptions.AddCodeOption(options, data, L["Custom Sort"], "custom_sort", "https://github.com/WeakAuras/WeakAuras2/wiki/Custom-Code-Blocks#custom-sort",
|
||||
21, function() return data.sort ~= "custom" end, {"customSort"}, nil, nil, nil, nil, nil, true)
|
||||
WeakAuras.AddCodeOption(options, data, L["Custom Anchor"], "custom_anchor_per_unit", "https://github.com/WeakAuras/WeakAuras2/wiki/Custom-Dynamic-Group",
|
||||
WeakAuras.commonOptions.AddCodeOption(options, data, L["Custom Anchor"], "custom_anchor_per_unit", "https://github.com/WeakAuras/WeakAuras2/wiki/Custom-Code-Blocks#group-by-frame",
|
||||
1.7, function() return not(data.grow ~= "CUSTOM" and data.useAnchorPerUnit and data.anchorPerUnit == "CUSTOM") end, {"customAnchorPerUnit"}, nil, nil, nil, nil, nil, true)
|
||||
|
||||
local borderHideFunc = function() return data.useAnchorPerUnit or data.grow == "CUSTOM" end
|
||||
local disableSelfPoint = function() return data.grow ~= "CUSTOM" and data.grow ~= "GRID" and not data.useAnchorPerUnit end
|
||||
|
||||
for k, v in pairs(WeakAuras.BorderOptions(id, data, nil, borderHideFunc, 70)) do
|
||||
for k, v in pairs(WeakAuras.commonOptions.BorderOptions(id, data, nil, borderHideFunc, 70)) do
|
||||
options[k] = v
|
||||
end
|
||||
|
||||
return {
|
||||
dynamicgroup = options,
|
||||
position = WeakAuras.PositionOptions(id, data, nil, true, disableSelfPoint),
|
||||
position = WeakAuras.commonOptions.PositionOptions(id, data, nil, true, disableSelfPoint),
|
||||
};
|
||||
end
|
||||
|
||||
|
||||
@@ -55,7 +55,6 @@ local function createOptions(id, data)
|
||||
data.groupIcon = v
|
||||
WeakAuras.Add(data)
|
||||
WeakAuras.UpdateThumbnail(data)
|
||||
WeakAuras.SetIconNames(data)
|
||||
end
|
||||
},
|
||||
chooseIcon = {
|
||||
@@ -557,13 +556,13 @@ local function createOptions(id, data)
|
||||
},
|
||||
};
|
||||
|
||||
for k, v in pairs(WeakAuras.BorderOptions(id, data, nil, nil, 70)) do
|
||||
for k, v in pairs(WeakAuras.commonOptions.BorderOptions(id, data, nil, nil, 70)) do
|
||||
options[k] = v
|
||||
end
|
||||
|
||||
return {
|
||||
group = options,
|
||||
position = WeakAuras.PositionOptions(id, data, nil, true, true),
|
||||
position = WeakAuras.commonOptions.PositionOptions(id, data, nil, true, true),
|
||||
};
|
||||
end
|
||||
|
||||
|
||||
@@ -40,7 +40,6 @@ local function createOptions(id, data)
|
||||
data.displayIcon = v;
|
||||
WeakAuras.Add(data);
|
||||
WeakAuras.UpdateThumbnail(data);
|
||||
WeakAuras.SetIconNames(data);
|
||||
end
|
||||
},
|
||||
chooseIcon = {
|
||||
@@ -99,7 +98,7 @@ local function createOptions(id, data)
|
||||
end,
|
||||
imageWidth = 24,
|
||||
imageHeight = 24,
|
||||
func = function()
|
||||
func = function(info, button)
|
||||
local collapsed = WeakAuras.IsCollapsed("icon", "icon", "iconextra", true);
|
||||
WeakAuras.SetCollapsed("icon", "icon", "iconextra", not collapsed);
|
||||
end,
|
||||
@@ -199,7 +198,7 @@ local function createOptions(id, data)
|
||||
|
||||
return {
|
||||
icon = options,
|
||||
position = WeakAuras.PositionOptions(id, data),
|
||||
position = WeakAuras.commonOptions.PositionOptions(id, data),
|
||||
};
|
||||
end
|
||||
|
||||
|
||||
@@ -115,13 +115,13 @@ local function createOptions(id, data)
|
||||
}
|
||||
end
|
||||
|
||||
for k, v in pairs(WeakAuras.BorderOptions(id, data, nil, nil, 70)) do
|
||||
for k, v in pairs(WeakAuras.commonOptions.BorderOptions(id, data, nil, nil, 70)) do
|
||||
options[k] = v
|
||||
end
|
||||
|
||||
return {
|
||||
model = options,
|
||||
position = WeakAuras.PositionOptions(id, data, nil, nil, nil),
|
||||
position = WeakAuras.commonOptions.PositionOptions(id, data, nil, nil, nil),
|
||||
};
|
||||
end
|
||||
|
||||
|
||||
@@ -168,7 +168,6 @@ local function createOptions(id, data)
|
||||
data.crop_x = v;
|
||||
WeakAuras.Add(data);
|
||||
WeakAuras.UpdateThumbnail(data);
|
||||
WeakAuras.SetIconNames(data);
|
||||
if(data.parent) then
|
||||
local parentData = WeakAuras.GetData(data.parent);
|
||||
if(parentData) then
|
||||
@@ -192,7 +191,6 @@ local function createOptions(id, data)
|
||||
data.crop_y = v;
|
||||
WeakAuras.Add(data);
|
||||
WeakAuras.UpdateThumbnail(data);
|
||||
WeakAuras.SetIconNames(data);
|
||||
if(data.parent) then
|
||||
local parentData = WeakAuras.GetData(data.parent);
|
||||
if(parentData) then
|
||||
@@ -315,7 +313,7 @@ local function createOptions(id, data)
|
||||
|
||||
return {
|
||||
progresstexture = options,
|
||||
position = WeakAuras.PositionOptions(id, data),
|
||||
position = WeakAuras.commonOptions.PositionOptions(id, data),
|
||||
};
|
||||
end
|
||||
|
||||
|
||||
@@ -29,9 +29,8 @@ local function createOptions(id, data)
|
||||
set = function(info, v)
|
||||
data.displayText = WeakAuras.ReplaceLocalizedRaidMarkers(v);
|
||||
WeakAuras.Add(data);
|
||||
WeakAuras.ReloadOptions2(data.id, data)
|
||||
WeakAuras.ClearAndUpdateOptions(data.id)
|
||||
WeakAuras.UpdateThumbnail(data);
|
||||
WeakAuras.SetIconNames(data);
|
||||
WeakAuras.ResetMoverSizer();
|
||||
end,
|
||||
},
|
||||
@@ -105,7 +104,7 @@ local function createOptions(id, data)
|
||||
|
||||
return secondline
|
||||
end,
|
||||
func = function()
|
||||
func = function(info, button)
|
||||
local collapsed = WeakAuras.IsCollapsed("text", "text", "fontflags", true)
|
||||
WeakAuras.SetCollapsed("text", "text", "fontflags", not collapsed)
|
||||
end,
|
||||
@@ -240,7 +239,7 @@ local function createOptions(id, data)
|
||||
},
|
||||
};
|
||||
|
||||
WeakAuras.AddCodeOption(options, data, L["Custom Function"], "customText", "https://github.com/WeakAuras/WeakAuras2/wiki/Custom-Code-Blocks#custom-text",
|
||||
WeakAuras.commonOptions.AddCodeOption(options, data, L["Custom Function"], "customText", "https://github.com/WeakAuras/WeakAuras2/wiki/Custom-Code-Blocks#custom-text",
|
||||
37, function() return not WeakAuras.ContainsCustomPlaceHolder(data.displayText) end, {"customText"}, false);
|
||||
|
||||
-- Add Text Format Options
|
||||
@@ -266,7 +265,7 @@ local function createOptions(id, data)
|
||||
option.set = function(info, v)
|
||||
data["displayText_format_" .. key] = v
|
||||
WeakAuras.Add(data)
|
||||
WeakAuras.ReloadOptions2(data.id, data)
|
||||
WeakAuras.ClearAndUpdateOptions(data.id)
|
||||
end
|
||||
end
|
||||
options["displayText_format_" .. key] = option
|
||||
@@ -282,7 +281,7 @@ local function createOptions(id, data)
|
||||
|
||||
return {
|
||||
text = options;
|
||||
position = WeakAuras.PositionOptions(id, data, nil, true);
|
||||
position = WeakAuras.commonOptions.PositionOptions(id, data, nil, true);
|
||||
};
|
||||
end
|
||||
|
||||
@@ -394,4 +393,4 @@ local templates = {
|
||||
}
|
||||
}
|
||||
|
||||
WeakAuras.RegisterRegionOptions("text", createOptions, createIcon, L["Text"], createThumbnail, modifyThumbnail, L["Shows one or more lines of text, which can include dynamic information such as progress or stacks"], templates);
|
||||
WeakAuras.RegisterRegionOptions("text", createOptions, createIcon, L["Text"], createThumbnail, modifyThumbnail, L["Shows one or more lines of text, which can include dynamic information such as progress or stacks"], templates);
|
||||
|
||||
@@ -100,7 +100,7 @@ local function createOptions(id, data)
|
||||
|
||||
return {
|
||||
texture = options,
|
||||
position = WeakAuras.PositionOptions(id, data),
|
||||
position = WeakAuras.commonOptions.PositionOptions(id, data),
|
||||
};
|
||||
end
|
||||
|
||||
|
||||
Reference in New Issue
Block a user