beta
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
if not WeakAuras.IsCorrectVersion() then return end
|
||||
local AddonName, OptionsPrivate = ...
|
||||
|
||||
local SharedMedia = LibStub("LibSharedMedia-3.0");
|
||||
local L = WeakAuras.L;
|
||||
@@ -8,22 +9,22 @@ local function createOptions(parentData, data, index, subIndex)
|
||||
__title = L["Model %s"]:format(subIndex),
|
||||
__order = 1,
|
||||
__up = function()
|
||||
if (WeakAuras.ApplyToDataOrChildData(parentData, WeakAuras.MoveSubRegionUp, index, "subbarmodel")) then
|
||||
if (OptionsPrivate.Private.ApplyToDataOrChildData(parentData, OptionsPrivate.MoveSubRegionUp, index, "subbarmodel")) then
|
||||
WeakAuras.ClearAndUpdateOptions(parentData.id)
|
||||
end
|
||||
end,
|
||||
__down = function()
|
||||
if (WeakAuras.ApplyToDataOrChildData(parentData, WeakAuras.MoveSubRegionDown, index, "subbarmodel")) then
|
||||
if (OptionsPrivate.Private.ApplyToDataOrChildData(parentData, OptionsPrivate.MoveSubRegionDown, index, "subbarmodel")) then
|
||||
WeakAuras.ClearAndUpdateOptions(parentData.id)
|
||||
end
|
||||
end,
|
||||
__duplicate = function()
|
||||
if (WeakAuras.ApplyToDataOrChildData(parentData, WeakAuras.DuplicateSubRegion, index, "subbarmodel")) then
|
||||
if (OptionsPrivate.Private.ApplyToDataOrChildData(parentData, OptionsPrivate.DuplicateSubRegion, index, "subbarmodel")) then
|
||||
WeakAuras.ClearAndUpdateOptions(parentData.id)
|
||||
end
|
||||
end,
|
||||
__delete = function()
|
||||
if (WeakAuras.ApplyToDataOrChildData(parentData, WeakAuras.DeleteSubRegion, index, "subbarmodel")) then
|
||||
if (OptionsPrivate.Private.ApplyToDataOrChildData(parentData, WeakAuras.DeleteSubRegion, index, "subbarmodel")) then
|
||||
WeakAuras.ClearAndUpdateOptions(parentData.id)
|
||||
end
|
||||
end,
|
||||
@@ -45,7 +46,7 @@ local function createOptions(parentData, data, index, subIndex)
|
||||
name = L["Choose"],
|
||||
order = 11,
|
||||
func = function()
|
||||
WeakAuras.OpenModelPicker(data, parentData);
|
||||
OptionsPrivate.OpenModelPicker(data, parentData);
|
||||
end,
|
||||
},
|
||||
bar_model_clip = {
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
if not WeakAuras.IsCorrectVersion() then return end
|
||||
local AddonName, OptionsPrivate = ...
|
||||
|
||||
local SharedMedia = LibStub("LibSharedMedia-3.0");
|
||||
local L = WeakAuras.L;
|
||||
@@ -10,22 +11,22 @@ local function createOptions(parentData, data, index, subIndex)
|
||||
__title = L["Border %s"]:format(subIndex),
|
||||
__order = 1,
|
||||
__up = function()
|
||||
if (WeakAuras.ApplyToDataOrChildData(parentData, WeakAuras.MoveSubRegionUp, index, "subborder")) then
|
||||
if (OptionsPrivate.Private.ApplyToDataOrChildData(parentData, OptionsPrivate.MoveSubRegionUp, index, "subborder")) then
|
||||
WeakAuras.ClearAndUpdateOptions(parentData.id)
|
||||
end
|
||||
end,
|
||||
__down = function()
|
||||
if (WeakAuras.ApplyToDataOrChildData(parentData, WeakAuras.MoveSubRegionDown, index, "subborder")) then
|
||||
if (OptionsPrivate.Private.ApplyToDataOrChildData(parentData, OptionsPrivate.MoveSubRegionDown, index, "subborder")) then
|
||||
WeakAuras.ClearAndUpdateOptions(parentData.id)
|
||||
end
|
||||
end,
|
||||
__duplicate = function()
|
||||
if (WeakAuras.ApplyToDataOrChildData(parentData, WeakAuras.DuplicateSubRegion, index, "subtext")) then
|
||||
if (OptionsPrivate.Private.ApplyToDataOrChildData(parentData, OptionsPrivate.DuplicateSubRegion, index, "subtext")) then
|
||||
WeakAuras.ClearAndUpdateOptions(parentData.id)
|
||||
end
|
||||
end,
|
||||
__delete = function()
|
||||
if (WeakAuras.ApplyToDataOrChildData(parentData, WeakAuras.DeleteSubRegion, index, "subborder")) then
|
||||
if (OptionsPrivate.Private.ApplyToDataOrChildData(parentData, WeakAuras.DeleteSubRegion, index, "subborder")) then
|
||||
WeakAuras.ClearAndUpdateOptions(parentData.id)
|
||||
end
|
||||
end,
|
||||
@@ -73,7 +74,7 @@ local function createOptions(parentData, data, index, subIndex)
|
||||
width = WeakAuras.normalWidth,
|
||||
name = L["Border Anchor"],
|
||||
order = 7,
|
||||
values = WeakAuras.aurabar_anchor_areas,
|
||||
values = OptionsPrivate.Private.aurabar_anchor_areas,
|
||||
hidden = function() return parentData.regionType ~= "aurabar" end
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
if not WeakAuras.IsCorrectVersion() then return end
|
||||
local AddonName, OptionsPrivate = ...
|
||||
|
||||
local SharedMedia = LibStub("LibSharedMedia-3.0");
|
||||
local L = WeakAuras.L;
|
||||
@@ -12,29 +13,29 @@ local indentWidth = 0.15
|
||||
local function createOptions(parentData, data, index, subIndex)
|
||||
|
||||
local hiddenGlowExtra = function()
|
||||
return WeakAuras.IsCollapsed("glow", "glow", "glowextra" .. index, true);
|
||||
return OptionsPrivate.IsCollapsed("glow", "glow", "glowextra" .. index, true);
|
||||
end
|
||||
|
||||
local options = {
|
||||
__title = L["Glow %s"]:format(subIndex),
|
||||
__order = 1,
|
||||
__up = function()
|
||||
if (WeakAuras.ApplyToDataOrChildData(parentData, WeakAuras.MoveSubRegionUp, index, "subglow")) then
|
||||
if (OptionsPrivate.Private.ApplyToDataOrChildData(parentData, OptionsPrivate.MoveSubRegionUp, index, "subglow")) then
|
||||
WeakAuras.ClearAndUpdateOptions(parentData.id)
|
||||
end
|
||||
end,
|
||||
__down = function()
|
||||
if (WeakAuras.ApplyToDataOrChildData(parentData, WeakAuras.MoveSubRegionDown, index, "subglow")) then
|
||||
if (OptionsPrivate.Private.ApplyToDataOrChildData(parentData, OptionsPrivate.MoveSubRegionDown, index, "subglow")) then
|
||||
WeakAuras.ClearAndUpdateOptions(parentData.id)
|
||||
end
|
||||
end,
|
||||
__duplicate = function()
|
||||
if (WeakAuras.ApplyToDataOrChildData(parentData, WeakAuras.DuplicateSubRegion, index, "subglow")) then
|
||||
if (OptionsPrivate.Private.ApplyToDataOrChildData(parentData, OptionsPrivate.DuplicateSubRegion, index, "subglow")) then
|
||||
WeakAuras.ClearAndUpdateOptions(parentData.id)
|
||||
end
|
||||
end,
|
||||
__delete = function()
|
||||
if (WeakAuras.ApplyToDataOrChildData(parentData, WeakAuras.DeleteSubRegion, index, "subglow")) then
|
||||
if (OptionsPrivate.Private.ApplyToDataOrChildData(parentData, WeakAuras.DeleteSubRegion, index, "subglow")) then
|
||||
WeakAuras.ClearAndUpdateOptions(parentData.id)
|
||||
end
|
||||
end,
|
||||
@@ -49,14 +50,14 @@ local function createOptions(parentData, data, index, subIndex)
|
||||
width = WeakAuras.normalWidth,
|
||||
name = L["Type"],
|
||||
order = 2,
|
||||
values = WeakAuras.glow_types,
|
||||
values = OptionsPrivate.Private.glow_types,
|
||||
},
|
||||
glow_anchor = {
|
||||
type = "select",
|
||||
width = WeakAuras.normalWidth,
|
||||
name = L["Glow Anchor"],
|
||||
order = 3,
|
||||
values = WeakAuras.aurabar_anchor_areas,
|
||||
values = OptionsPrivate.Private.aurabar_anchor_areas,
|
||||
hidden = function() return parentData.regionType ~= "aurabar" end
|
||||
},
|
||||
glowExtraDescription = {
|
||||
@@ -107,14 +108,14 @@ local function createOptions(parentData, data, index, subIndex)
|
||||
width = WeakAuras.doubleWidth,
|
||||
order = 4,
|
||||
image = function()
|
||||
local collapsed = WeakAuras.IsCollapsed("glow", "glow", "glowextra" .. index, true);
|
||||
local collapsed = OptionsPrivate.IsCollapsed("glow", "glow", "glowextra" .. index, true);
|
||||
return collapsed and "collapsed" or "expanded"
|
||||
end,
|
||||
imageWidth = 15,
|
||||
imageHeight = 15,
|
||||
func = function(info, button)
|
||||
local collapsed = WeakAuras.IsCollapsed("glow", "glow", "glowextra" .. index, true);
|
||||
WeakAuras.SetCollapsed("glow", "glow", "glowextra" .. index, not collapsed);
|
||||
local collapsed = OptionsPrivate.IsCollapsed("glow", "glow", "glowextra" .. index, true);
|
||||
OptionsPrivate.SetCollapsed("glow", "glow", "glowextra" .. index, not collapsed);
|
||||
end,
|
||||
arg = {
|
||||
expanderName = "glow" .. index .. "#" .. subIndex
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
if not WeakAuras.IsCorrectVersion() then return end
|
||||
local AddonName, OptionsPrivate = ...
|
||||
|
||||
-- Magic constant
|
||||
local deleteCondition = {}
|
||||
@@ -44,7 +45,7 @@ function WeakAuras.DeleteSubRegion(data, index, regionType)
|
||||
end
|
||||
end
|
||||
|
||||
function WeakAuras.MoveSubRegionUp(data, index, regionType)
|
||||
function OptionsPrivate.MoveSubRegionUp(data, index, regionType)
|
||||
if not data.subRegions or index <= 1 then
|
||||
return
|
||||
end
|
||||
@@ -63,7 +64,7 @@ function WeakAuras.MoveSubRegionUp(data, index, regionType)
|
||||
end
|
||||
end
|
||||
|
||||
function WeakAuras.MoveSubRegionDown(data, index, regionType)
|
||||
function OptionsPrivate.MoveSubRegionDown(data, index, regionType)
|
||||
if not data.subRegions then
|
||||
return
|
||||
end
|
||||
@@ -82,7 +83,7 @@ function WeakAuras.MoveSubRegionDown(data, index, regionType)
|
||||
end
|
||||
end
|
||||
|
||||
function WeakAuras.DuplicateSubRegion(data, index, regionType)
|
||||
function OptionsPrivate.DuplicateSubRegion(data, index, regionType)
|
||||
if not data.subRegions then
|
||||
return
|
||||
end
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
if not WeakAuras.IsCorrectVersion() then return end
|
||||
local AddonName, OptionsPrivate = ...
|
||||
|
||||
local SharedMedia = LibStub("LibSharedMedia-3.0")
|
||||
local L = WeakAuras.L
|
||||
@@ -22,7 +23,7 @@ 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
|
||||
local hiddenFontExtra = function()
|
||||
return WeakAuras.IsCollapsed("subtext", "subtext", "fontflags" .. index, true)
|
||||
return OptionsPrivate.IsCollapsed("subtext", "subtext", "fontflags" .. index, true)
|
||||
end
|
||||
|
||||
local indentWidth = 0.15
|
||||
@@ -31,22 +32,22 @@ local function createOptions(parentData, data, index, subIndex)
|
||||
__title = L["Text %s"]:format(subIndex),
|
||||
__order = 1,
|
||||
__up = function()
|
||||
if (WeakAuras.ApplyToDataOrChildData(parentData, WeakAuras.MoveSubRegionUp, index, "subtext")) then
|
||||
if (OptionsPrivate.Private.ApplyToDataOrChildData(parentData, OptionsPrivate.MoveSubRegionUp, index, "subtext")) then
|
||||
WeakAuras.ClearAndUpdateOptions(parentData.id)
|
||||
end
|
||||
end,
|
||||
__down = function()
|
||||
if (WeakAuras.ApplyToDataOrChildData(parentData, WeakAuras.MoveSubRegionDown, index, "subtext")) then
|
||||
if (OptionsPrivate.Private.ApplyToDataOrChildData(parentData, OptionsPrivate.MoveSubRegionDown, index, "subtext")) then
|
||||
WeakAuras.ClearAndUpdateOptions(parentData.id)
|
||||
end
|
||||
end,
|
||||
__duplicate = function()
|
||||
if (WeakAuras.ApplyToDataOrChildData(parentData, WeakAuras.DuplicateSubRegion, index, "subtext")) then
|
||||
if (OptionsPrivate.Private.ApplyToDataOrChildData(parentData, OptionsPrivate.DuplicateSubRegion, index, "subtext")) then
|
||||
WeakAuras.ClearAndUpdateOptions(parentData.id)
|
||||
end
|
||||
end,
|
||||
__delete = function()
|
||||
if (WeakAuras.ApplyToDataOrChildData(parentData, WeakAuras.DeleteSubRegion, index, "subtext")) then
|
||||
if (OptionsPrivate.Private.ApplyToDataOrChildData(parentData, WeakAuras.DeleteSubRegion, index, "subtext")) then
|
||||
WeakAuras.ClearAndUpdateOptions(parentData.id)
|
||||
end
|
||||
end,
|
||||
@@ -67,12 +68,12 @@ local function createOptions(parentData, data, index, subIndex)
|
||||
type = "input",
|
||||
width = WeakAuras.normalWidth,
|
||||
desc = function()
|
||||
return L["Dynamic text tooltip"] .. WeakAuras.GetAdditionalProperties(parentData)
|
||||
return L["Dynamic text tooltip"] .. OptionsPrivate.Private.GetAdditionalProperties(parentData)
|
||||
end,
|
||||
name = L["Display Text"],
|
||||
order = 11,
|
||||
set = function(info, v)
|
||||
data.text_text = WeakAuras.ReplaceLocalizedRaidMarkers(v)
|
||||
data.text_text = OptionsPrivate.Private.ReplaceLocalizedRaidMarkers(v)
|
||||
WeakAuras.Add(parentData)
|
||||
WeakAuras.ClearAndUpdateOptions(parentData.id)
|
||||
end
|
||||
@@ -98,7 +99,7 @@ local function createOptions(parentData, data, index, subIndex)
|
||||
type = "execute",
|
||||
control = "WeakAurasExpandSmall",
|
||||
name = function()
|
||||
local textFlags = WeakAuras.font_flags[data.text_fontType]
|
||||
local textFlags = OptionsPrivate.Private.font_flags[data.text_fontType]
|
||||
local color = format("%02x%02x%02x%02x",
|
||||
data.text_shadowColor[4] * 255, data.text_shadowColor[1] * 255,
|
||||
data.text_shadowColor[2] * 255, data.text_shadowColor[3]*255)
|
||||
@@ -130,11 +131,11 @@ local function createOptions(parentData, data, index, subIndex)
|
||||
width = WeakAuras.doubleWidth,
|
||||
order = 44,
|
||||
func = function(info, button)
|
||||
local collapsed = WeakAuras.IsCollapsed("subtext", "subtext", "fontflags" .. index, true)
|
||||
WeakAuras.SetCollapsed("subtext", "subtext", "fontflags" .. index, not collapsed)
|
||||
local collapsed = OptionsPrivate.IsCollapsed("subtext", "subtext", "fontflags" .. index, true)
|
||||
OptionsPrivate.SetCollapsed("subtext", "subtext", "fontflags" .. index, not collapsed)
|
||||
end,
|
||||
image = function()
|
||||
local collapsed = WeakAuras.IsCollapsed("subtext", "subtext", "fontflags" .. index, true)
|
||||
local collapsed = OptionsPrivate.IsCollapsed("subtext", "subtext", "fontflags" .. index, true)
|
||||
return collapsed and "collapsed" or "expanded"
|
||||
end,
|
||||
imageWidth = 15,
|
||||
@@ -157,7 +158,7 @@ local function createOptions(parentData, data, index, subIndex)
|
||||
width = WeakAuras.normalWidth - indentWidth,
|
||||
name = L["Outline"],
|
||||
order = 46,
|
||||
values = WeakAuras.font_flags,
|
||||
values = OptionsPrivate.Private.font_flags,
|
||||
hidden = hiddenFontExtra
|
||||
},
|
||||
text_shadowColor = {
|
||||
@@ -208,7 +209,7 @@ local function createOptions(parentData, data, index, subIndex)
|
||||
type = "select",
|
||||
width = WeakAuras.normalWidth - indentWidth,
|
||||
name = L["Alignment"],
|
||||
values = WeakAuras.justify_types,
|
||||
values = OptionsPrivate.Private.justify_types,
|
||||
order = 50,
|
||||
hidden = hiddenFontExtra
|
||||
},
|
||||
@@ -224,7 +225,7 @@ local function createOptions(parentData, data, index, subIndex)
|
||||
width = WeakAuras.normalWidth - indentWidth,
|
||||
name = L["Width"],
|
||||
order = 51.5,
|
||||
values = WeakAuras.text_automatic_width,
|
||||
values = OptionsPrivate.Private.text_automatic_width,
|
||||
hidden = hiddenFontExtra
|
||||
},
|
||||
text_font_space6 = {
|
||||
@@ -256,7 +257,7 @@ local function createOptions(parentData, data, index, subIndex)
|
||||
width = WeakAuras.normalWidth,
|
||||
name = L["Overflow"],
|
||||
order = 54,
|
||||
values = WeakAuras.text_word_wrap,
|
||||
values = OptionsPrivate.Private.text_word_wrap,
|
||||
hidden = function() return hiddenFontExtra() or data.text_automaticWidth ~= "Fixed" end
|
||||
},
|
||||
|
||||
@@ -282,10 +283,10 @@ local function createOptions(parentData, data, index, subIndex)
|
||||
anchors = {}
|
||||
for index, childId in ipairs(parentData.controlledChildren) do
|
||||
local childData = WeakAuras.GetData(childId)
|
||||
WeakAuras.Mixin(anchors, WeakAuras.GetAnchorsForData(childData, "point"))
|
||||
WeakAuras.Mixin(anchors, OptionsPrivate.Private.GetAnchorsForData(childData, "point"))
|
||||
end
|
||||
else
|
||||
anchors = WeakAuras.GetAnchorsForData(parentData, "point")
|
||||
anchors = OptionsPrivate.Private.GetAnchorsForData(parentData, "point")
|
||||
end
|
||||
-- Anchor Options
|
||||
options.text_anchorsDescription = {
|
||||
@@ -319,14 +320,14 @@ local function createOptions(parentData, data, index, subIndex)
|
||||
width = WeakAuras.doubleWidth,
|
||||
order = 60,
|
||||
image = function()
|
||||
local collapsed = WeakAuras.IsCollapsed("subregion", "text_anchors", tostring(index), true)
|
||||
local collapsed = OptionsPrivate.IsCollapsed("subregion", "text_anchors", tostring(index), true)
|
||||
return collapsed and "collapsed" or "expanded"
|
||||
end,
|
||||
imageWidth = 15,
|
||||
imageHeight = 15,
|
||||
func = function(info, button)
|
||||
local collapsed = WeakAuras.IsCollapsed("subregion", "text_anchors", tostring(index), true)
|
||||
WeakAuras.SetCollapsed("subregion", "text_anchors", tostring(index), not collapsed)
|
||||
local collapsed = OptionsPrivate.IsCollapsed("subregion", "text_anchors", tostring(index), true)
|
||||
OptionsPrivate.SetCollapsed("subregion", "text_anchors", tostring(index), not collapsed)
|
||||
end,
|
||||
arg = {
|
||||
expanderName = "subtext_anchor" .. index .. "#" .. subIndex
|
||||
@@ -335,7 +336,7 @@ local function createOptions(parentData, data, index, subIndex)
|
||||
|
||||
|
||||
local hiddenFunction = function()
|
||||
return WeakAuras.IsCollapsed("subregion", "text_anchors", tostring(index), true)
|
||||
return OptionsPrivate.IsCollapsed("subregion", "text_anchors", tostring(index), true)
|
||||
end
|
||||
|
||||
options.text_anchor_space = {
|
||||
@@ -414,7 +415,7 @@ local function createOptions(parentData, data, index, subIndex)
|
||||
end
|
||||
|
||||
for index, subRegion in ipairs(parentData.subRegions) do
|
||||
if subRegion.type == "subtext" and WeakAuras.ContainsCustomPlaceHolder(subRegion.text_text) then
|
||||
if subRegion.type == "subtext" and OptionsPrivate.Private.ContainsCustomPlaceHolder(subRegion.text_text) then
|
||||
return false
|
||||
end
|
||||
end
|
||||
@@ -429,7 +430,7 @@ local function createOptions(parentData, data, index, subIndex)
|
||||
width = WeakAuras.doubleWidth,
|
||||
hidden = hideCustomTextOption,
|
||||
name = L["Update Custom Text On..."],
|
||||
values = WeakAuras.text_check_types,
|
||||
values = OptionsPrivate.Private.text_check_types,
|
||||
order = 3,
|
||||
get = function() return parentData.customTextUpdate or "event" end,
|
||||
set = function(info, v)
|
||||
@@ -440,16 +441,16 @@ local function createOptions(parentData, data, index, subIndex)
|
||||
},
|
||||
}
|
||||
|
||||
WeakAuras.commonOptions.AddCodeOption(commonTextOptions, parentData, L["Custom Function"], "customText", "https://github.com/WeakAuras/WeakAuras2/wiki/Custom-Code-Blocks#custom-text",
|
||||
OptionsPrivate.commonOptions.AddCodeOption(commonTextOptions, parentData, L["Custom Function"], "customText", "https://github.com/WeakAuras/WeakAuras2/wiki/Custom-Code-Blocks#custom-text",
|
||||
4, hideCustomTextOption, {"customText"}, false)
|
||||
|
||||
-- Add Text Format Options
|
||||
local hidden = function()
|
||||
return WeakAuras.IsCollapsed("format_option", "text", "text_text", true)
|
||||
return OptionsPrivate.IsCollapsed("format_option", "text", "text_text", true)
|
||||
end
|
||||
|
||||
local setHidden = function(hidden)
|
||||
WeakAuras.SetCollapsed("format_option", "text", "text_text", hidden)
|
||||
OptionsPrivate.SetCollapsed("format_option", "text", "text_text", hidden)
|
||||
end
|
||||
|
||||
local order = 12
|
||||
@@ -478,7 +479,7 @@ local function createOptions(parentData, data, index, subIndex)
|
||||
return childData["text_text_format_" .. key]
|
||||
end
|
||||
local input = childData["text_text"]
|
||||
WeakAuras.AddTextFormatOption(input, true, get, addOption, hidden, setHidden)
|
||||
OptionsPrivate.AddTextFormatOption(input, true, get, addOption, hidden, setHidden)
|
||||
end
|
||||
end
|
||||
end
|
||||
@@ -487,7 +488,7 @@ local function createOptions(parentData, data, index, subIndex)
|
||||
return data["text_text_format_" .. key]
|
||||
end
|
||||
local input = data["text_text"]
|
||||
WeakAuras.AddTextFormatOption(input, true, get, addOption, hidden, setHidden)
|
||||
OptionsPrivate.AddTextFormatOption(input, true, get, addOption, hidden, setHidden)
|
||||
end
|
||||
|
||||
addOption("footer", {
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
if not WeakAuras.IsCorrectVersion() then return end
|
||||
local AddonName, OptionsPrivate = ...
|
||||
|
||||
local SharedMedia = LibStub("LibSharedMedia-3.0");
|
||||
local L = WeakAuras.L;
|
||||
@@ -7,29 +8,29 @@ local indentWidth = WeakAuras.normalWidth * 0.06
|
||||
|
||||
local function createOptions(parentData, data, index, subIndex)
|
||||
local hiddentickextras = function()
|
||||
return WeakAuras.IsCollapsed("subtext", "subtext", "tickextras" .. index, true)
|
||||
return OptionsPrivate.IsCollapsed("subtext", "subtext", "tickextras" .. index, true)
|
||||
end
|
||||
local options = {
|
||||
__title = L["Tick %s"]:format(subIndex),
|
||||
__order = 1,
|
||||
__up = function()
|
||||
if (WeakAuras.ApplyToDataOrChildData(parentData, WeakAuras.MoveSubRegionUp, index, "subtick")) then
|
||||
WeakAuras.ReloadOptions2(parentData.id, parentData)
|
||||
if (OptionsPrivate.Private.ApplyToDataOrChildData(parentData, OptionsPrivate.MoveSubRegionUp, index, "subtick")) then
|
||||
WeakAuras.ClearAndUpdateOptions(parentData.id)
|
||||
end
|
||||
end,
|
||||
__down = function()
|
||||
if (WeakAuras.ApplyToDataOrChildData(parentData, WeakAuras.MoveSubRegionDown, index, "subtick")) then
|
||||
WeakAuras.ReloadOptions2(parentData.id, parentData)
|
||||
if (OptionsPrivate.Private.ApplyToDataOrChildData(parentData, OptionsPrivate.MoveSubRegionDown, index, "subtick")) then
|
||||
WeakAuras.ClearAndUpdateOptions(parentData.id)
|
||||
end
|
||||
end,
|
||||
__duplicate = function()
|
||||
if (WeakAuras.ApplyToDataOrChildData(parentData, WeakAuras.DuplicateSubRegion, index, "subtick")) then
|
||||
WeakAuras.ReloadOptions2(parentData.id, parentData)
|
||||
if (OptionsPrivate.Private.ApplyToDataOrChildData(parentData, OptionsPrivate.DuplicateSubRegion, index, "subtick")) then
|
||||
WeakAuras.ClearAndUpdateOptions(parentData.id)
|
||||
end
|
||||
end,
|
||||
__delete = function()
|
||||
if (WeakAuras.ApplyToDataOrChildData(parentData, WeakAuras.DeleteSubRegion, index, "subtick")) then
|
||||
WeakAuras.ReloadOptions2(parentData.id, parentData)
|
||||
if (OptionsPrivate.Private.ApplyToDataOrChildData(parentData, WeakAuras.DeleteSubRegion, index, "subtick")) then
|
||||
WeakAuras.ClearAndUpdateOptions(parentData.id)
|
||||
end
|
||||
end,
|
||||
tick_visible = {
|
||||
@@ -50,7 +51,7 @@ local function createOptions(parentData, data, index, subIndex)
|
||||
width = WeakAuras.normalWidth,
|
||||
name = L["Tick Mode"],
|
||||
order = 3,
|
||||
values = WeakAuras.tick_placement_modes,
|
||||
values = OptionsPrivate.Private.tick_placement_modes,
|
||||
},
|
||||
tick_placement = {
|
||||
type = "input",
|
||||
@@ -83,7 +84,7 @@ local function createOptions(parentData, data, index, subIndex)
|
||||
local texturetext = ""
|
||||
if data.use_texture then
|
||||
local desaturatetext = data.tick_desaturate and L["|cFFFF0000desaturated|r "] or ""
|
||||
local blendtext = WeakAuras.blend_types[data.tick_blend_mode]
|
||||
local blendtext = OptionsPrivate.Private.blend_types[data.tick_blend_mode]
|
||||
local rotationtext = data.tick_rotation ~= 0 and L[" rotated |cFFFF0000%s|r degrees"]:format(data.tick_rotation) or ""
|
||||
local mirrortext = data.tick_mirror and L[" and |cFFFF0000mirrored|r"] or ""
|
||||
texturetext = L["%s|cFFFF0000custom|r texture with |cFFFF0000%s|r blend mode%s%s"]:format(desaturatetext, blendtext, rotationtext, mirrortext)
|
||||
@@ -103,11 +104,11 @@ local function createOptions(parentData, data, index, subIndex)
|
||||
width = WeakAuras.doubleWidth,
|
||||
order = 6,
|
||||
func = function(info, button)
|
||||
local collapsed = WeakAuras.IsCollapsed("subtext", "subtext", "tickextras" .. index, true)
|
||||
WeakAuras.SetCollapsed("subtext", "subtext", "tickextras" .. index, not collapsed)
|
||||
local collapsed = OptionsPrivate.IsCollapsed("subtext", "subtext", "tickextras" .. index, true)
|
||||
OptionsPrivate.SetCollapsed("subtext", "subtext", "tickextras" .. index, not collapsed)
|
||||
end,
|
||||
image = function()
|
||||
local collapsed = WeakAuras.IsCollapsed("subtext", "subtext", "tickextras" .. index, true)
|
||||
local collapsed = OptionsPrivate.IsCollapsed("subtext", "subtext", "tickextras" .. index, true)
|
||||
return collapsed and "collapsed" or "expanded"
|
||||
end,
|
||||
imageWidth = 15,
|
||||
@@ -147,7 +148,7 @@ local function createOptions(parentData, data, index, subIndex)
|
||||
width = WeakAuras.normalWidth,
|
||||
name = L["Blend Mode"],
|
||||
order = 10,
|
||||
values = WeakAuras.blend_types,
|
||||
values = OptionsPrivate.Private.blend_types,
|
||||
disabled = function() return not data.use_texture end,
|
||||
hidden = hiddentickextras,
|
||||
},
|
||||
@@ -172,7 +173,7 @@ local function createOptions(parentData, data, index, subIndex)
|
||||
width = WeakAuras.normalWidth,
|
||||
order = 13,
|
||||
func = function()
|
||||
WeakAuras.OpenTexturePicker(data, "tick_texture", WeakAuras.texture_types);
|
||||
OptionsPrivate.OpenTexturePicker(data, "tick_texture", OptionsPrivate.Private.texture_types);
|
||||
end,
|
||||
disabled = function() return not data.use_texture end,
|
||||
hidden = hiddentickextras,
|
||||
|
||||
Reference in New Issue
Block a user