This commit is contained in:
Bunny67
2021-01-03 11:41:17 +03:00
parent 9c5f676808
commit 2994ddedbb
@@ -8,51 +8,71 @@ local function createOptions(id, data)
__title = L["Progress Texture Settings"], __title = L["Progress Texture Settings"],
__order = 1, __order = 1,
foregroundTexture = { foregroundTexture = {
width = WeakAuras.normalWidth, width = WeakAuras.normalWidth - 0.15,
type = "input", type = "input",
name = L["Foreground Texture"], name = L["Foreground Texture"],
order = 1 order = 1
}, },
chooseForegroundTexture = {
type = "execute",
name = L["Choose"],
width = 0.15,
order = 2,
func = function()
OptionsPrivate.OpenTexturePicker(data, {}, {
texture = "foregroundTexture",
color = "foregroundColor",
rotation = "rotation",
mirror = "mirror",
blendMode = "blendMode"
}, OptionsPrivate.Private.texture_types);
end,
imageWidth = 24,
imageHeight = 24,
control = "WeakAurasIcon",
image = "Interface\\AddOns\\WeakAuras\\Media\\Textures\\browse",
},
backgroundTexture = { backgroundTexture = {
type = "input", type = "input",
width = WeakAuras.normalWidth, width = WeakAuras.normalWidth - 0.15,
name = L["Background Texture"], name = L["Background Texture"],
order = 5, order = 5,
disabled = function() return data.sameTexture; end, disabled = function() return data.sameTexture; end,
get = function() return data.sameTexture and data.foregroundTexture or data.backgroundTexture; end get = function() return data.sameTexture and data.foregroundTexture or data.backgroundTexture; end
}, },
chooseBackgroundTexture = {
type = "execute",
name = L["Choose"],
width = 0.15,
order = 6,
func = function()
OptionsPrivate.OpenTexturePicker(data, {}, {
texture = "backgroundTexture",
color = "backgroundColor",
rotation = "rotation",
mirror = "mirror",
blendMode = "blendMode"
}, OptionsPrivate.Private.texture_types);
end,
disabled = function() return data.sameTexture; end,
imageWidth = 24,
imageHeight = 24,
control = "WeakAurasIcon",
image = "Interface\\AddOns\\WeakAuras\\Media\\Textures\\browse",
},
mirror = { mirror = {
type = "toggle", type = "toggle",
width = WeakAuras.halfWidth, width = WeakAuras.normalWidth,
name = L["Mirror"], name = L["Mirror"],
order = 10, order = 10,
disabled = function() return data.orientation == "CLOCKWISE" or data.orientation == "ANTICLOCKWISE"; end disabled = function() return data.orientation == "CLOCKWISE" or data.orientation == "ANTICLOCKWISE"; end
}, },
chooseForegroundTexture = {
type = "execute",
name = L["Choose"],
width = WeakAuras.halfWidth,
order = 12,
func = function()
OptionsPrivate.OpenTexturePicker(data, data, "foregroundTexture", OptionsPrivate.Private.texture_types);
end
},
sameTexture = { sameTexture = {
type = "toggle", type = "toggle",
name = L["Same"], name = L["Same"],
width = WeakAuras.halfWidth, width = WeakAuras.normalWidth,
order = 15 order = 15
}, },
chooseBackgroundTexture = {
type = "execute",
name = L["Choose"],
width = WeakAuras.halfWidth,
order = 17,
func = function()
OptionsPrivate.OpenTexturePicker(data, data, "backgroundTexture", OptionsPrivate.Private.texture_types);
end,
disabled = function() return data.sameTexture; end
},
desaturateForeground = { desaturateForeground = {
type = "toggle", type = "toggle",
width = WeakAuras.normalWidth, width = WeakAuras.normalWidth,