This commit is contained in:
Bunny67
2020-08-08 15:48:17 +03:00
parent 13550c449c
commit 073ca1ffe3
15 changed files with 406 additions and 132 deletions
+35 -7
View File
@@ -135,10 +135,13 @@ local function createOptions(parentData, data, index, subIndex)
end,
image = function()
local collapsed = WeakAuras.IsCollapsed("subtext", "subtext", "fontflags" .. index, true)
return collapsed and "Interface\\AddOns\\WeakAuras\\Media\\Textures\\edit" or "Interface\\AddOns\\WeakAuras\\Media\\Textures\\editdown"
return collapsed and "collapsed" or "expanded"
end,
imageWidth = 24,
imageHeight = 24
imageWidth = 15,
imageHeight = 15,
arg = {
expanderName = "subtext" .. index .. "#" .. subIndex
}
},
text_font_space = {
@@ -256,6 +259,17 @@ local function createOptions(parentData, data, index, subIndex)
values = WeakAuras.text_word_wrap,
hidden = function() return hiddenFontExtra() or data.text_automaticWidth ~= "Fixed" end
},
text_anchor = {
type = "description",
name = "",
order = 55,
hidden = hiddenFontExtra,
control = "WeakAurasExpandAnchor",
arg = {
expanderName = "subtext" .. index .. "#" .. subIndex
}
}
}
-- Note: Anchor Options need to be generalized once there are multiple sub regions
@@ -306,14 +320,17 @@ local function createOptions(parentData, data, index, subIndex)
order = 60,
image = function()
local collapsed = WeakAuras.IsCollapsed("subregion", "text_anchors", tostring(index), true)
return collapsed and "Interface\\AddOns\\WeakAuras\\Media\\Textures\\edit" or "Interface\\AddOns\\WeakAuras\\Media\\Textures\\editdown"
return collapsed and "collapsed" or "expanded"
end,
imageWidth = 24,
imageHeight = 24,
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)
end
end,
arg = {
expanderName = "subtext_anchor" .. index .. "#" .. subIndex
}
}
@@ -380,6 +397,17 @@ local function createOptions(parentData, data, index, subIndex)
hidden = hiddenFunction
}
options.text_anchor_anchor = {
type = "description",
name = "",
order = 61,
hidden = hiddenFontExtra,
control = "WeakAurasExpandAnchor",
arg = {
expanderName = "subtext_anchor" .. index .. "#" .. subIndex
}
}
local function hideCustomTextOption()
if not parentData.subRegions then
return true