beta
This commit is contained in:
@@ -24,7 +24,7 @@ local function createOptions(id, data)
|
||||
width = WeakAuras.normalWidth,
|
||||
name = L["Orientation"],
|
||||
order = 25,
|
||||
values = WeakAuras.orientation_types,
|
||||
values = OptionsPrivate.Private.orientation_types,
|
||||
set = function(info, v)
|
||||
if(
|
||||
(
|
||||
@@ -58,7 +58,7 @@ local function createOptions(id, data)
|
||||
data.orientation = v;
|
||||
WeakAuras.Add(data);
|
||||
WeakAuras.UpdateThumbnail(data);
|
||||
WeakAuras.ResetMoverSizer();
|
||||
OptionsPrivate.ResetMoverSizer();
|
||||
end
|
||||
},
|
||||
inverse = {
|
||||
@@ -71,7 +71,7 @@ local function createOptions(id, data)
|
||||
type = "toggle",
|
||||
width = WeakAuras.normalWidth,
|
||||
name = L["Tooltip on Mouseover"],
|
||||
hidden = function() return not WeakAuras.CanHaveTooltip(data) end,
|
||||
hidden = function() return not OptionsPrivate.Private.CanHaveTooltip(data) end,
|
||||
order = 38
|
||||
},
|
||||
bar_header = {
|
||||
@@ -120,15 +120,15 @@ local function createOptions(id, data)
|
||||
name = L["Auto"],
|
||||
desc = L["Choose whether the displayed icon is automatic or defined manually"],
|
||||
order = 40.3,
|
||||
disabled = function() return not WeakAuras.CanHaveAuto(data); end,
|
||||
get = function() return WeakAuras.CanHaveAuto(data) and data.auto end,
|
||||
disabled = function() return not OptionsPrivate.Private.CanHaveAuto(data); end,
|
||||
get = function() return OptionsPrivate.Private.CanHaveAuto(data) and data.auto end,
|
||||
hidden = function() return not data.icon end,
|
||||
},
|
||||
displayIcon = {
|
||||
type = "input",
|
||||
width = WeakAuras.normalWidth,
|
||||
name = L["Display Icon"],
|
||||
hidden = function() return WeakAuras.CanHaveAuto(data) and data.auto or not data.icon; end,
|
||||
hidden = function() return OptionsPrivate.Private.CanHaveAuto(data) and data.auto or not data.icon; end,
|
||||
disabled = function() return not data.icon end,
|
||||
order = 40.4,
|
||||
get = function()
|
||||
@@ -144,16 +144,16 @@ local function createOptions(id, data)
|
||||
type = "execute",
|
||||
width = WeakAuras.normalWidth,
|
||||
name = L["Choose"],
|
||||
hidden = function() return WeakAuras.CanHaveAuto(data) and data.auto or not data.icon; end,
|
||||
hidden = function() return OptionsPrivate.Private.CanHaveAuto(data) and data.auto or not data.icon; end,
|
||||
disabled = function() return not data.icon end,
|
||||
order = 40.5,
|
||||
func = function() WeakAuras.OpenIconPicker(data, "displayIcon"); end
|
||||
func = function() OptionsPrivate.OpenIconPicker(data, "displayIcon"); end
|
||||
},
|
||||
icon_side = {
|
||||
type = "select",
|
||||
width = WeakAuras.normalWidth,
|
||||
name = L["Icon Position"],
|
||||
values = WeakAuras.icon_side_types,
|
||||
values = OptionsPrivate.Private.icon_side_types,
|
||||
hidden = function() return data.orientation:find("VERTICAL") or not data.icon end,
|
||||
order = 40.6,
|
||||
},
|
||||
@@ -161,7 +161,7 @@ local function createOptions(id, data)
|
||||
type = "select",
|
||||
width = WeakAuras.normalWidth,
|
||||
name = L["Icon Position"],
|
||||
values = WeakAuras.rotated_icon_side_types,
|
||||
values = OptionsPrivate.Private.rotated_icon_side_types,
|
||||
hidden = function() return data.orientation:find("HORIZONTAL") or not data.icon end,
|
||||
order = 40.7,
|
||||
get = function()
|
||||
@@ -241,7 +241,7 @@ local function createOptions(id, data)
|
||||
width = WeakAuras.halfWidth,
|
||||
order = 44.3,
|
||||
func = function()
|
||||
WeakAuras.OpenTexturePicker(data, data, "sparkTexture", WeakAuras.texture_types);
|
||||
OptionsPrivate.OpenTexturePicker(data, data, "sparkTexture", OptionsPrivate.Private.texture_types);
|
||||
end,
|
||||
disabled = function() return not data.spark end,
|
||||
hidden = function() return not data.spark end,
|
||||
@@ -260,7 +260,7 @@ local function createOptions(id, data)
|
||||
width = WeakAuras.normalWidth,
|
||||
name = L["Blend Mode"],
|
||||
order = 44.5,
|
||||
values = WeakAuras.blend_types,
|
||||
values = OptionsPrivate.Private.blend_types,
|
||||
disabled = function() return not data.spark end,
|
||||
hidden = function() return not data.spark end,
|
||||
},
|
||||
@@ -311,7 +311,7 @@ local function createOptions(id, data)
|
||||
sparkRotationMode = {
|
||||
type = "select",
|
||||
width = WeakAuras.normalWidth,
|
||||
values = WeakAuras.spark_rotation_types,
|
||||
values = OptionsPrivate.Private.spark_rotation_types,
|
||||
name = L["Rotation Mode"],
|
||||
order = 45,
|
||||
disabled = function() return not data.spark end,
|
||||
@@ -339,7 +339,7 @@ local function createOptions(id, data)
|
||||
sparkHidden = {
|
||||
type = "select",
|
||||
width = WeakAuras.normalWidth,
|
||||
values = WeakAuras.spark_hide_types,
|
||||
values = OptionsPrivate.Private.spark_hide_types,
|
||||
name = L["Hide on"],
|
||||
order = 45.3,
|
||||
disabled = function() return not data.spark end,
|
||||
@@ -354,7 +354,7 @@ local function createOptions(id, data)
|
||||
|
||||
options = WeakAuras.regionPrototype.AddAdjustedDurationOptions(options, data, 36.5);
|
||||
|
||||
local overlayInfo = WeakAuras.GetOverlayInfo(data);
|
||||
local overlayInfo = OptionsPrivate.Private.GetOverlayInfo(data);
|
||||
if (overlayInfo and next(overlayInfo)) then
|
||||
options["overlayheader"] = {
|
||||
type = "header",
|
||||
@@ -397,7 +397,7 @@ local function createOptions(id, data)
|
||||
|
||||
return {
|
||||
aurabar = options,
|
||||
position = WeakAuras.commonOptions.PositionOptions(id, data),
|
||||
position = OptionsPrivate.commonOptions.PositionOptions(id, data),
|
||||
};
|
||||
end
|
||||
|
||||
@@ -734,12 +734,12 @@ local function subCreateOptions(parentData, data, index, subIndex)
|
||||
__title = L["Foreground"],
|
||||
__order = 1,
|
||||
__up = function()
|
||||
if (WeakAuras.ApplyToDataOrChildData(parentData, WeakAuras.MoveSubRegionUp, index, "aurabar_bar")) then
|
||||
if (OptionsPrivate.Private.ApplyToDataOrChildData(parentData, OptionsPrivate.MoveSubRegionUp, index, "aurabar_bar")) then
|
||||
WeakAuras.ClearAndUpdateOptions(parentData.id)
|
||||
end
|
||||
end,
|
||||
__down = function()
|
||||
if (WeakAuras.ApplyToDataOrChildData(parentData, WeakAuras.MoveSubRegionDown, index, "aurabar_bar")) then
|
||||
if (OptionsPrivate.Private.ApplyToDataOrChildData(parentData, OptionsPrivate.MoveSubRegionDown, index, "aurabar_bar")) then
|
||||
WeakAuras.ClearAndUpdateOptions(parentData.id, parentData)
|
||||
end
|
||||
end,
|
||||
|
||||
@@ -98,7 +98,7 @@ local function createOptions(id, data)
|
||||
width = WeakAuras.normalWidth,
|
||||
name = L["Choose"],
|
||||
order = 0.51,
|
||||
func = function() WeakAuras.OpenIconPicker(data, "groupIcon", true) end
|
||||
func = function() OptionsPrivate.OpenIconPicker(data, "groupIcon", true) end
|
||||
},
|
||||
-- grow options
|
||||
grow = {
|
||||
@@ -106,7 +106,7 @@ local function createOptions(id, data)
|
||||
width = WeakAuras.doubleWidth,
|
||||
name = L["Grow"],
|
||||
order = 1,
|
||||
values = WeakAuras.grow_types,
|
||||
values = OptionsPrivate.Private.grow_types,
|
||||
set = function(info, v)
|
||||
data.grow = v
|
||||
local selfPoint = selfPoints[data.grow] or selfPoints.default
|
||||
@@ -116,7 +116,7 @@ local function createOptions(id, data)
|
||||
data.selfPoint = selfPoint
|
||||
WeakAuras.Add(data)
|
||||
WeakAuras.ClearAndUpdateOptions(data.id)
|
||||
WeakAuras.ResetMoverSizer()
|
||||
OptionsPrivate.ResetMoverSizer()
|
||||
end,
|
||||
},
|
||||
useAnchorPerUnit = {
|
||||
@@ -150,7 +150,7 @@ local function createOptions(id, data)
|
||||
width = WeakAuras.normalWidth,
|
||||
name = L["Align"],
|
||||
order = 2,
|
||||
values = WeakAuras.align_types,
|
||||
values = OptionsPrivate.Private.align_types,
|
||||
set = function(info, v)
|
||||
data.align = v
|
||||
local selfPoint = selfPoints[data.grow] or selfPoints.default
|
||||
@@ -160,7 +160,7 @@ local function createOptions(id, data)
|
||||
data.selfPoint = selfPoint
|
||||
WeakAuras.Add(data)
|
||||
WeakAuras.ClearAndUpdateOptions(data.id)
|
||||
WeakAuras.ResetMoverSizer()
|
||||
OptionsPrivate.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,
|
||||
disabled = function() return data.grow == "CIRCLE" or data.grow == "COUNTERCIRCLE" end
|
||||
@@ -170,7 +170,7 @@ local function createOptions(id, data)
|
||||
width = WeakAuras.normalWidth,
|
||||
name = L["Align"],
|
||||
order = 3,
|
||||
values = WeakAuras.rotated_align_types,
|
||||
values = OptionsPrivate.Private.rotated_align_types,
|
||||
hidden = function() return (data.grow == "CUSTOM" or data.grow == "UP" or data.grow == "DOWN" or data.grow == "VERTICAL" or data.grow == "CIRCLE" or data.grow == "COUNTERCIRCLE" or data.grow == "GRID") end,
|
||||
get = function() return data.align; end,
|
||||
set = function(info, v)
|
||||
@@ -182,7 +182,7 @@ local function createOptions(id, data)
|
||||
data.selfPoint = selfPoint
|
||||
WeakAuras.Add(data)
|
||||
WeakAuras.ClearAndUpdateOptions(data.id)
|
||||
WeakAuras.ResetMoverSizer()
|
||||
OptionsPrivate.ResetMoverSizer()
|
||||
end,
|
||||
},
|
||||
-- circle grow options
|
||||
@@ -191,7 +191,7 @@ local function createOptions(id, data)
|
||||
width = WeakAuras.normalWidth,
|
||||
name = L["Constant Factor"],
|
||||
order = 4,
|
||||
values = WeakAuras.circular_group_constant_factor_types,
|
||||
values = OptionsPrivate.Private.circular_group_constant_factor_types,
|
||||
hidden = function() return data.grow ~= "CIRCLE" and data.grow ~= "COUNTERCIRCLE" end
|
||||
},
|
||||
rotation = {
|
||||
@@ -238,13 +238,13 @@ local function createOptions(id, data)
|
||||
width = WeakAuras.normalWidth,
|
||||
name = L["Grid direction"],
|
||||
order = 8,
|
||||
values = WeakAuras.grid_types,
|
||||
values = OptionsPrivate.Private.grid_types,
|
||||
hidden = function() return data.grow ~= "GRID" end,
|
||||
set = function(info, value)
|
||||
data.selfPoint = gridSelfPoints[value]
|
||||
data.gridType = value
|
||||
WeakAuras.Add(data)
|
||||
WeakAuras.ResetMoverSizer()
|
||||
OptionsPrivate.ResetMoverSizer()
|
||||
end,
|
||||
},
|
||||
gridWidth = {
|
||||
@@ -321,7 +321,7 @@ local function createOptions(id, data)
|
||||
width = WeakAuras.doubleWidth,
|
||||
name = L["Sort"],
|
||||
order = 20,
|
||||
values = WeakAuras.group_sort_types
|
||||
values = OptionsPrivate.Private.group_sort_types
|
||||
},
|
||||
-- custom sort option added below
|
||||
hybridPosition = {
|
||||
@@ -329,7 +329,7 @@ local function createOptions(id, data)
|
||||
width = WeakAuras.normalWidth,
|
||||
name = L["Hybrid Position"],
|
||||
order = 21,
|
||||
values = WeakAuras.group_hybrid_position_types,
|
||||
values = OptionsPrivate.Private.group_hybrid_position_types,
|
||||
hidden = function() return not(data.sort == "hybrid") end,
|
||||
},
|
||||
hybridSortMode = {
|
||||
@@ -337,7 +337,7 @@ local function createOptions(id, data)
|
||||
width = WeakAuras.normalWidth,
|
||||
name = L["Hybrid Sort Mode"],
|
||||
order = 22,
|
||||
values = WeakAuras.group_hybrid_sort_types,
|
||||
values = OptionsPrivate.Private.group_hybrid_sort_types,
|
||||
hidden = function() return not(data.sort == "hybrid") end,
|
||||
},
|
||||
sortHybrid = {
|
||||
@@ -409,7 +409,7 @@ local function createOptions(id, data)
|
||||
data.yOffset = data.yOffset/(1-change)
|
||||
data.scale = v
|
||||
WeakAuras.Add(data);
|
||||
WeakAuras.ResetMoverSizer();
|
||||
OptionsPrivate.ResetMoverSizer();
|
||||
end
|
||||
},
|
||||
endHeader = {
|
||||
@@ -419,23 +419,23 @@ local function createOptions(id, data)
|
||||
},
|
||||
};
|
||||
|
||||
WeakAuras.commonOptions.AddCodeOption(options, data, L["Custom Grow"], "custom_grow", "https://github.com/WeakAuras/WeakAuras2/wiki/Custom-Code-Blocks#grow",
|
||||
OptionsPrivate.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.commonOptions.AddCodeOption(options, data, L["Custom Sort"], "custom_sort", "https://github.com/WeakAuras/WeakAuras2/wiki/Custom-Code-Blocks#custom-sort",
|
||||
OptionsPrivate.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.commonOptions.AddCodeOption(options, data, L["Custom Anchor"], "custom_anchor_per_unit", "https://github.com/WeakAuras/WeakAuras2/wiki/Custom-Code-Blocks#group-by-frame",
|
||||
OptionsPrivate.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.commonOptions.BorderOptions(id, data, nil, borderHideFunc, 70)) do
|
||||
for k, v in pairs(OptionsPrivate.commonOptions.BorderOptions(id, data, nil, borderHideFunc, 70)) do
|
||||
options[k] = v
|
||||
end
|
||||
|
||||
return {
|
||||
dynamicgroup = options,
|
||||
position = WeakAuras.commonOptions.PositionOptions(id, data, nil, true, disableSelfPoint),
|
||||
position = OptionsPrivate.commonOptions.PositionOptions(id, data, nil, true, disableSelfPoint),
|
||||
};
|
||||
end
|
||||
|
||||
|
||||
@@ -80,14 +80,14 @@ local function createOptions(id, data)
|
||||
width = WeakAuras.normalWidth,
|
||||
name = L["Choose"],
|
||||
order = 0.51,
|
||||
func = function() WeakAuras.OpenIconPicker(data, "groupIcon", true) end
|
||||
func = function() OptionsPrivate.OpenIconPicker(data, "groupIcon", true) end
|
||||
},
|
||||
align_h = {
|
||||
type = "select",
|
||||
width = WeakAuras.normalWidth,
|
||||
name = L["Horizontal Align"],
|
||||
order = 10,
|
||||
values = WeakAuras.align_types,
|
||||
values = OptionsPrivate.Private.align_types,
|
||||
get = function()
|
||||
if(#data.controlledChildren < 1) then
|
||||
return nil;
|
||||
@@ -145,7 +145,7 @@ local function createOptions(id, data)
|
||||
end
|
||||
end
|
||||
WeakAuras.Add(data);
|
||||
WeakAuras.ResetMoverSizer();
|
||||
OptionsPrivate.ResetMoverSizer();
|
||||
end
|
||||
},
|
||||
align_v = {
|
||||
@@ -153,7 +153,7 @@ local function createOptions(id, data)
|
||||
width = WeakAuras.normalWidth,
|
||||
name = L["Vertical Align"],
|
||||
order = 15,
|
||||
values = WeakAuras.rotated_align_types,
|
||||
values = OptionsPrivate.Private.rotated_align_types,
|
||||
get = function()
|
||||
if(#data.controlledChildren < 1) then
|
||||
return nil;
|
||||
@@ -211,7 +211,7 @@ local function createOptions(id, data)
|
||||
end
|
||||
end
|
||||
WeakAuras.Add(data);
|
||||
WeakAuras.ResetMoverSizer();
|
||||
OptionsPrivate.ResetMoverSizer();
|
||||
end
|
||||
},
|
||||
distribute_h = {
|
||||
@@ -294,7 +294,7 @@ local function createOptions(id, data)
|
||||
end
|
||||
|
||||
WeakAuras.Add(data);
|
||||
WeakAuras.ResetMoverSizer();
|
||||
OptionsPrivate.ResetMoverSizer();
|
||||
end
|
||||
},
|
||||
distribute_v = {
|
||||
@@ -377,7 +377,7 @@ local function createOptions(id, data)
|
||||
end
|
||||
|
||||
WeakAuras.Add(data);
|
||||
WeakAuras.ResetMoverSizer();
|
||||
OptionsPrivate.ResetMoverSizer();
|
||||
end
|
||||
},
|
||||
space_h = {
|
||||
@@ -460,7 +460,7 @@ local function createOptions(id, data)
|
||||
end
|
||||
|
||||
WeakAuras.Add(data);
|
||||
WeakAuras.ResetMoverSizer();
|
||||
OptionsPrivate.ResetMoverSizer();
|
||||
end
|
||||
},
|
||||
space_v = {
|
||||
@@ -543,7 +543,7 @@ local function createOptions(id, data)
|
||||
end
|
||||
|
||||
WeakAuras.Add(data);
|
||||
WeakAuras.ResetMoverSizer();
|
||||
OptionsPrivate.ResetMoverSizer();
|
||||
end
|
||||
},
|
||||
scale = {
|
||||
@@ -564,7 +564,7 @@ local function createOptions(id, data)
|
||||
data.yOffset = data.yOffset/(1-change)
|
||||
data.scale = v
|
||||
WeakAuras.Add(data);
|
||||
WeakAuras.ResetMoverSizer();
|
||||
OptionsPrivate.ResetMoverSizer();
|
||||
end
|
||||
},
|
||||
endHeader = {
|
||||
@@ -574,13 +574,13 @@ local function createOptions(id, data)
|
||||
},
|
||||
};
|
||||
|
||||
for k, v in pairs(WeakAuras.commonOptions.BorderOptions(id, data, nil, nil, 70)) do
|
||||
for k, v in pairs(OptionsPrivate.commonOptions.BorderOptions(id, data, nil, nil, 70)) do
|
||||
options[k] = v
|
||||
end
|
||||
|
||||
return {
|
||||
group = options,
|
||||
position = WeakAuras.commonOptions.PositionOptions(id, data, nil, true, true),
|
||||
position = OptionsPrivate.commonOptions.PositionOptions(id, data, nil, true, true),
|
||||
};
|
||||
end
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@ local L = WeakAuras.L
|
||||
|
||||
local function createOptions(id, data)
|
||||
local hiddenIconExtra = function()
|
||||
return WeakAuras.IsCollapsed("icon", "icon", "iconextra", true);
|
||||
return OptionsPrivate.IsCollapsed("icon", "icon", "iconextra", true);
|
||||
end
|
||||
local indentWidth = 0.15
|
||||
|
||||
@@ -25,14 +25,14 @@ local function createOptions(id, data)
|
||||
width = WeakAuras.normalWidth,
|
||||
name = L["Automatic Icon"],
|
||||
order = 2,
|
||||
disabled = function() return not WeakAuras.CanHaveAuto(data); end,
|
||||
get = function() return WeakAuras.CanHaveAuto(data) and data.auto; end
|
||||
disabled = function() return not OptionsPrivate.Private.CanHaveAuto(data); end,
|
||||
get = function() return OptionsPrivate.Private.CanHaveAuto(data) and data.auto; end
|
||||
},
|
||||
displayIcon = {
|
||||
type = "input",
|
||||
width = WeakAuras.normalWidth,
|
||||
name = L["Display Icon"],
|
||||
hidden = function() return WeakAuras.CanHaveAuto(data) and data.auto; end,
|
||||
hidden = function() return OptionsPrivate.Private.CanHaveAuto(data) and data.auto; end,
|
||||
order = 3,
|
||||
get = function()
|
||||
return data.displayIcon and tostring(data.displayIcon) or "";
|
||||
@@ -47,9 +47,9 @@ local function createOptions(id, data)
|
||||
type = "execute",
|
||||
width = WeakAuras.normalWidth,
|
||||
name = L["Choose"],
|
||||
hidden = function() return WeakAuras.CanHaveAuto(data) and data.auto; end,
|
||||
hidden = function() return OptionsPrivate.Private.CanHaveAuto(data) and data.auto; end,
|
||||
order = 4,
|
||||
func = function() WeakAuras.OpenIconPicker(data, "displayIcon"); end
|
||||
func = function() OptionsPrivate.OpenIconPicker(data, "displayIcon"); end
|
||||
},
|
||||
desaturate = {
|
||||
type = "toggle",
|
||||
@@ -61,7 +61,7 @@ local function createOptions(id, data)
|
||||
type = "toggle",
|
||||
width = WeakAuras.normalWidth,
|
||||
name = L["Tooltip on Mouseover"],
|
||||
hidden = function() return not WeakAuras.CanHaveTooltip(data) end,
|
||||
hidden = function() return not OptionsPrivate.Private.CanHaveTooltip(data) end,
|
||||
order = 6
|
||||
},
|
||||
iconExtraDescription = {
|
||||
@@ -94,14 +94,14 @@ local function createOptions(id, data)
|
||||
width = WeakAuras.doubleWidth,
|
||||
order = 7,
|
||||
image = function()
|
||||
local collapsed = WeakAuras.IsCollapsed("icon", "icon", "iconextra", true);
|
||||
local collapsed = OptionsPrivate.IsCollapsed("icon", "icon", "iconextra", true);
|
||||
return collapsed and "collapsed" or "expanded"
|
||||
end,
|
||||
imageWidth = 15,
|
||||
imageHeight = 15,
|
||||
func = function(info, button)
|
||||
local collapsed = WeakAuras.IsCollapsed("icon", "icon", "iconextra", true);
|
||||
WeakAuras.SetCollapsed("icon", "icon", "iconextra", not collapsed);
|
||||
local collapsed = OptionsPrivate.IsCollapsed("icon", "icon", "iconextra", true);
|
||||
OptionsPrivate.SetCollapsed("icon", "icon", "iconextra", not collapsed);
|
||||
end,
|
||||
arg = {
|
||||
expanderName = "icon"
|
||||
@@ -183,16 +183,16 @@ local function createOptions(id, data)
|
||||
width = WeakAuras.normalWidth,
|
||||
name = L["Show Cooldown"],
|
||||
order = 11.1,
|
||||
disabled = function() return not WeakAuras.CanHaveDuration(data); end,
|
||||
get = function() return WeakAuras.CanHaveDuration(data) and data.cooldown; end
|
||||
disabled = function() return not OptionsPrivate.Private.CanHaveDuration(data); end,
|
||||
get = function() return OptionsPrivate.Private.CanHaveDuration(data) and data.cooldown; end
|
||||
},
|
||||
inverse = {
|
||||
type = "toggle",
|
||||
width = WeakAuras.normalWidth,
|
||||
name = L["Inverse"],
|
||||
order = 11.2,
|
||||
disabled = function() return not (WeakAuras.CanHaveDuration(data) and data.cooldown); end,
|
||||
get = function() return data.inverse and WeakAuras.CanHaveDuration(data) and data.cooldown; end,
|
||||
disabled = function() return not (OptionsPrivate.Private.CanHaveDuration(data) and data.cooldown); end,
|
||||
get = function() return data.inverse and OptionsPrivate.Private.CanHaveDuration(data) and data.cooldown; end,
|
||||
hidden = function() return not data.cooldown end
|
||||
},
|
||||
cooldownEdge = {
|
||||
@@ -200,7 +200,7 @@ local function createOptions(id, data)
|
||||
width = WeakAuras.normalWidth,
|
||||
name = L["Cooldown Edge"],
|
||||
order = 11.3,
|
||||
disabled = function() return not WeakAuras.CanHaveDuration(data) end,
|
||||
disabled = function() return not OptionsPrivate.Private.CanHaveDuration(data) end,
|
||||
hidden = function() return not data.cooldown end,
|
||||
},
|
||||
endHeader = {
|
||||
@@ -212,7 +212,7 @@ local function createOptions(id, data)
|
||||
|
||||
return {
|
||||
icon = options,
|
||||
position = WeakAuras.commonOptions.PositionOptions(id, data),
|
||||
position = OptionsPrivate.commonOptions.PositionOptions(id, data),
|
||||
};
|
||||
end
|
||||
|
||||
@@ -236,7 +236,7 @@ local function modifyThumbnail(parent, frame, data)
|
||||
end
|
||||
|
||||
if data then
|
||||
local name, icon = WeakAuras.GetNameAndIcon(data);
|
||||
local name, icon = OptionsPrivate.Private.GetNameAndIcon(data);
|
||||
frame:SetIcon(icon)
|
||||
end
|
||||
end
|
||||
|
||||
@@ -31,7 +31,7 @@ local function createOptions(id, data)
|
||||
name = L["Choose"],
|
||||
order = 2,
|
||||
func = function()
|
||||
WeakAuras.OpenModelPicker(data);
|
||||
OptionsPrivate.OpenModelPicker(data);
|
||||
end,
|
||||
hidden = function() return data.modelIsUnit end
|
||||
},
|
||||
@@ -116,13 +116,13 @@ local function createOptions(id, data)
|
||||
}
|
||||
end
|
||||
|
||||
for k, v in pairs(WeakAuras.commonOptions.BorderOptions(id, data, nil, nil, 70)) do
|
||||
for k, v in pairs(OptionsPrivate.commonOptions.BorderOptions(id, data, nil, nil, 70)) do
|
||||
options[k] = v
|
||||
end
|
||||
|
||||
return {
|
||||
model = options,
|
||||
position = WeakAuras.commonOptions.PositionOptions(id, data, nil, nil, nil),
|
||||
position = OptionsPrivate.commonOptions.PositionOptions(id, data, nil, nil, nil),
|
||||
};
|
||||
end
|
||||
|
||||
|
||||
@@ -34,7 +34,7 @@ local function createOptions(id, data)
|
||||
width = WeakAuras.halfWidth,
|
||||
order = 12,
|
||||
func = function()
|
||||
WeakAuras.OpenTexturePicker(data, data, "foregroundTexture", WeakAuras.texture_types);
|
||||
OptionsPrivate.OpenTexturePicker(data, data, "foregroundTexture", OptionsPrivate.Private.texture_types);
|
||||
end
|
||||
},
|
||||
sameTexture = {
|
||||
@@ -49,7 +49,7 @@ local function createOptions(id, data)
|
||||
width = WeakAuras.halfWidth,
|
||||
order = 17,
|
||||
func = function()
|
||||
WeakAuras.OpenTexturePicker(data, data, "backgroundTexture", WeakAuras.texture_types);
|
||||
OptionsPrivate.OpenTexturePicker(data, data, "backgroundTexture", OptionsPrivate.Private.texture_types);
|
||||
end,
|
||||
disabled = function() return data.sameTexture; end
|
||||
},
|
||||
@@ -70,7 +70,7 @@ local function createOptions(id, data)
|
||||
width = WeakAuras.normalWidth,
|
||||
name = L["Blend Mode"],
|
||||
order = 20,
|
||||
values = WeakAuras.blend_types
|
||||
values = OptionsPrivate.Private.blend_types
|
||||
},
|
||||
backgroundOffset = {
|
||||
type = "range",
|
||||
@@ -86,7 +86,7 @@ local function createOptions(id, data)
|
||||
width = WeakAuras.normalWidth,
|
||||
name = L["Orientation"],
|
||||
order = 35,
|
||||
values = WeakAuras.orientation_with_circle_types
|
||||
values = OptionsPrivate.Private.orientation_with_circle_types
|
||||
},
|
||||
compress = {
|
||||
type = "toggle",
|
||||
@@ -175,7 +175,7 @@ local function createOptions(id, data)
|
||||
WeakAuras.Add(parentData);
|
||||
end
|
||||
end
|
||||
WeakAuras.ResetMoverSizer();
|
||||
OptionsPrivate.ResetMoverSizer();
|
||||
end,
|
||||
},
|
||||
crop_y = {
|
||||
@@ -198,7 +198,7 @@ local function createOptions(id, data)
|
||||
WeakAuras.Add(parentData);
|
||||
end
|
||||
end
|
||||
WeakAuras.ResetMoverSizer();
|
||||
OptionsPrivate.ResetMoverSizer();
|
||||
end,
|
||||
},
|
||||
rotation = {
|
||||
@@ -250,7 +250,7 @@ local function createOptions(id, data)
|
||||
name = L["Slant Mode"],
|
||||
order = 55.5,
|
||||
hidden = function() return not data.slanted or data.orientation == "CLOCKWISE" or data.orientation == "ANTICLOCKWISE" end,
|
||||
values = WeakAuras.slant_mode
|
||||
values = OptionsPrivate.Private.slant_mode
|
||||
},
|
||||
spacer = {
|
||||
type = "header",
|
||||
@@ -265,7 +265,7 @@ local function createOptions(id, data)
|
||||
};
|
||||
options = WeakAuras.regionPrototype.AddAdjustedDurationOptions(options, data, 57);
|
||||
|
||||
local overlayInfo = WeakAuras.GetOverlayInfo(data);
|
||||
local overlayInfo = OptionsPrivate.Private.GetOverlayInfo(data);
|
||||
if (overlayInfo and next(overlayInfo)) then
|
||||
options["overlayheader"] = {
|
||||
type = "header",
|
||||
@@ -307,7 +307,7 @@ local function createOptions(id, data)
|
||||
|
||||
return {
|
||||
progresstexture = options,
|
||||
position = WeakAuras.commonOptions.PositionOptions(id, data),
|
||||
position = OptionsPrivate.commonOptions.PositionOptions(id, data),
|
||||
};
|
||||
end
|
||||
|
||||
@@ -773,7 +773,7 @@ local templates = {
|
||||
}
|
||||
|
||||
local function GetAnchors(data)
|
||||
return WeakAuras.default_types_for_anchor
|
||||
return OptionsPrivate.Private.default_types_for_anchor
|
||||
end
|
||||
|
||||
WeakAuras.RegisterRegionOptions("progresstexture", createOptions, createIcon, L["Progress Texture"], createThumbnail, modifyThumbnail, L["Shows a texture that changes based on duration"], templates, GetAnchors);
|
||||
|
||||
@@ -68,7 +68,7 @@ local function createOptions(id, data)
|
||||
name = L["Choose"],
|
||||
order = 12,
|
||||
func = function()
|
||||
WeakAuras.OpenTexturePicker(data, data, "foregroundTexture", texture_types, setTextureFunc);
|
||||
OptionsPrivate.OpenTexturePicker(data, data, "foregroundTexture", texture_types, setTextureFunc);
|
||||
end
|
||||
},
|
||||
sameTexture = {
|
||||
@@ -203,7 +203,7 @@ local function createOptions(id, data)
|
||||
width = WeakAuras.normalWidth,
|
||||
name = L["Blend Mode"],
|
||||
order = 20,
|
||||
values = WeakAuras.blend_types
|
||||
values = OptionsPrivate.Private.blend_types
|
||||
},
|
||||
animationType = {
|
||||
type = "select",
|
||||
@@ -283,10 +283,10 @@ local function createOptions(id, data)
|
||||
},
|
||||
};
|
||||
|
||||
if WeakAuras.commonOptions then
|
||||
if OptionsPrivate.commonOptions then
|
||||
return {
|
||||
stopmotion = options,
|
||||
position = WeakAuras.commonOptions.PositionOptions(id, data, 2),
|
||||
position = OptionsPrivate.commonOptions.PositionOptions(id, data, 2),
|
||||
};
|
||||
else
|
||||
return {
|
||||
|
||||
@@ -8,7 +8,7 @@ local screenWidth, screenHeight = math.ceil(GetScreenWidth() / 20) * 20, math.ce
|
||||
|
||||
local indentWidth = 0.15
|
||||
local hiddenFontExtra = function()
|
||||
return WeakAuras.IsCollapsed("text", "text", "fontflags", true)
|
||||
return OptionsPrivate.IsCollapsed("text", "text", "fontflags", true)
|
||||
end
|
||||
|
||||
local function createOptions(id, data)
|
||||
@@ -19,7 +19,7 @@ local function createOptions(id, data)
|
||||
type = "input",
|
||||
width = WeakAuras.doubleWidth,
|
||||
desc = function()
|
||||
return L["Dynamic text tooltip"] .. WeakAuras.GetAdditionalProperties(data)
|
||||
return L["Dynamic text tooltip"] .. OptionsPrivate.Private.GetAdditionalProperties(data)
|
||||
end,
|
||||
multiline = true,
|
||||
name = L["Display Text"],
|
||||
@@ -28,19 +28,19 @@ local function createOptions(id, data)
|
||||
return data.displayText;
|
||||
end,
|
||||
set = function(info, v)
|
||||
data.displayText = WeakAuras.ReplaceLocalizedRaidMarkers(v);
|
||||
data.displayText = OptionsPrivate.Private.ReplaceLocalizedRaidMarkers(v);
|
||||
WeakAuras.Add(data);
|
||||
WeakAuras.ClearAndUpdateOptions(data.id)
|
||||
WeakAuras.UpdateThumbnail(data);
|
||||
WeakAuras.ResetMoverSizer();
|
||||
OptionsPrivate.ResetMoverSizer();
|
||||
end,
|
||||
},
|
||||
customTextUpdate = {
|
||||
type = "select",
|
||||
width = WeakAuras.doubleWidth,
|
||||
hidden = function() return not WeakAuras.ContainsCustomPlaceHolder(data.displayText); end,
|
||||
hidden = function() return not OptionsPrivate.Private.ContainsCustomPlaceHolder(data.displayText); end,
|
||||
name = L["Update Custom Text On..."],
|
||||
values = WeakAuras.text_check_types,
|
||||
values = OptionsPrivate.Private.text_check_types,
|
||||
order = 36
|
||||
},
|
||||
-- code editor added below
|
||||
@@ -76,7 +76,7 @@ local function createOptions(id, data)
|
||||
type = "execute",
|
||||
control = "WeakAurasExpandSmall",
|
||||
name = function()
|
||||
local textFlags = WeakAuras.font_flags[data.outline]
|
||||
local textFlags = OptionsPrivate.Private.font_flags[data.outline]
|
||||
local color = format("%02x%02x%02x%02x",
|
||||
data.shadowColor[4] * 255, data.shadowColor[1] * 255,
|
||||
data.shadowColor[2] * 255, data.shadowColor[3]*255)
|
||||
@@ -106,11 +106,11 @@ local function createOptions(id, data)
|
||||
return secondline
|
||||
end,
|
||||
func = function(info, button)
|
||||
local collapsed = WeakAuras.IsCollapsed("text", "text", "fontflags", true)
|
||||
WeakAuras.SetCollapsed("text", "text", "fontflags", not collapsed)
|
||||
local collapsed = OptionsPrivate.IsCollapsed("text", "text", "fontflags", true)
|
||||
OptionsPrivate.SetCollapsed("text", "text", "fontflags", not collapsed)
|
||||
end,
|
||||
image = function()
|
||||
local collapsed = WeakAuras.IsCollapsed("text", "text", "fontflags", true)
|
||||
local collapsed = OptionsPrivate.IsCollapsed("text", "text", "fontflags", true)
|
||||
return collapsed and "collapsed" or "expanded"
|
||||
end,
|
||||
imageWidth = 15,
|
||||
@@ -132,7 +132,7 @@ local function createOptions(id, data)
|
||||
width = WeakAuras.normalWidth - indentWidth,
|
||||
name = L["Outline"],
|
||||
order = 48.2,
|
||||
values = WeakAuras.font_flags,
|
||||
values = OptionsPrivate.Private.font_flags,
|
||||
hidden = hiddenFontExtra
|
||||
},
|
||||
shadowColor = {
|
||||
@@ -184,7 +184,7 @@ local function createOptions(id, data)
|
||||
width = WeakAuras.normalWidth - indentWidth,
|
||||
name = L["Justify"],
|
||||
order = 48.8,
|
||||
values = WeakAuras.justify_types,
|
||||
values = OptionsPrivate.Private.justify_types,
|
||||
hidden = hiddenFontExtra,
|
||||
},
|
||||
text_font_space55 = {
|
||||
@@ -207,7 +207,7 @@ local function createOptions(id, data)
|
||||
width = WeakAuras.normalWidth - indentWidth,
|
||||
name = L["Width"],
|
||||
order = 49,
|
||||
values = WeakAuras.text_automatic_width,
|
||||
values = OptionsPrivate.Private.text_automatic_width,
|
||||
hidden = hiddenFontExtra,
|
||||
},
|
||||
fixedWidth = {
|
||||
@@ -232,7 +232,7 @@ local function createOptions(id, data)
|
||||
width = WeakAuras.normalWidth - indentWidth,
|
||||
name = L["Overflow"],
|
||||
order = 49.4,
|
||||
values = WeakAuras.text_word_wrap,
|
||||
values = OptionsPrivate.Private.text_word_wrap,
|
||||
hidden = function() return hiddenFontExtra() or data.automaticWidth ~= "Fixed" end
|
||||
},
|
||||
|
||||
@@ -254,17 +254,17 @@ local function createOptions(id, data)
|
||||
},
|
||||
};
|
||||
|
||||
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);
|
||||
OptionsPrivate.commonOptions.AddCodeOption(options, data, L["Custom Function"], "customText", "https://github.com/WeakAuras/WeakAuras2/wiki/Custom-Code-Blocks#custom-text",
|
||||
37, function() return not OptionsPrivate.Private.ContainsCustomPlaceHolder(data.displayText) end, {"customText"}, false);
|
||||
|
||||
-- Add Text Format Options
|
||||
local input = data.displayText
|
||||
local hidden = function()
|
||||
return WeakAuras.IsCollapsed("format_option", "text", "displayText", true)
|
||||
return OptionsPrivate.IsCollapsed("format_option", "text", "displayText", true)
|
||||
end
|
||||
|
||||
local setHidden = function(hidden)
|
||||
WeakAuras.SetCollapsed("format_option", "text", "displayText", hidden)
|
||||
OptionsPrivate.SetCollapsed("format_option", "text", "displayText", hidden)
|
||||
end
|
||||
|
||||
local get = function(key)
|
||||
@@ -286,7 +286,7 @@ local function createOptions(id, data)
|
||||
options["displayText_format_" .. key] = option
|
||||
end
|
||||
|
||||
WeakAuras.AddTextFormatOption(input, true, get, addOption, hidden, setHidden)
|
||||
OptionsPrivate.AddTextFormatOption(input, true, get, addOption, hidden, setHidden)
|
||||
addOption("footer", {
|
||||
type = "description",
|
||||
name = "",
|
||||
@@ -296,7 +296,7 @@ local function createOptions(id, data)
|
||||
|
||||
return {
|
||||
text = options;
|
||||
position = WeakAuras.commonOptions.PositionOptions(id, data, nil, true);
|
||||
position = OptionsPrivate.commonOptions.PositionOptions(id, data, nil, true);
|
||||
};
|
||||
end
|
||||
|
||||
|
||||
@@ -32,7 +32,7 @@ local function createOptions(id, data)
|
||||
width = WeakAuras.halfWidth,
|
||||
order = 7,
|
||||
func = function()
|
||||
WeakAuras.OpenTexturePicker(data, data, "texture", WeakAuras.texture_types);
|
||||
OptionsPrivate.OpenTexturePicker(data, data, "texture", OptionsPrivate.Private.texture_types);
|
||||
end
|
||||
},
|
||||
color = {
|
||||
@@ -47,7 +47,7 @@ local function createOptions(id, data)
|
||||
width = WeakAuras.normalWidth,
|
||||
name = L["Blend Mode"],
|
||||
order = 12,
|
||||
values = WeakAuras.blend_types
|
||||
values = OptionsPrivate.Private.blend_types
|
||||
},
|
||||
mirror = {
|
||||
type = "toggle",
|
||||
@@ -101,7 +101,7 @@ local function createOptions(id, data)
|
||||
|
||||
return {
|
||||
texture = options,
|
||||
position = WeakAuras.commonOptions.PositionOptions(id, data),
|
||||
position = OptionsPrivate.commonOptions.PositionOptions(id, data),
|
||||
};
|
||||
end
|
||||
|
||||
@@ -230,7 +230,7 @@ local templates = {
|
||||
}
|
||||
|
||||
local function GetAnchors(data)
|
||||
return WeakAuras.default_types_for_anchor
|
||||
return OptionsPrivate.Private.default_types_for_anchor
|
||||
end
|
||||
|
||||
WeakAuras.RegisterRegionOptions("texture", createOptions, createIcon, L["Texture"], createThumbnail, modifyThumbnail, L["Shows a custom texture"], templates, GetAnchors);
|
||||
|
||||
Reference in New Issue
Block a user