beta
This commit is contained in:
@@ -6,6 +6,9 @@ local L = WeakAuras.L;
|
||||
local indentWidth = WeakAuras.normalWidth * 0.06
|
||||
|
||||
local function createOptions(parentData, data, index, subIndex)
|
||||
local hiddentickextras = function()
|
||||
return WeakAuras.IsCollapsed("subtext", "subtext", "tickextras" .. index, true)
|
||||
end
|
||||
local options = {
|
||||
__title = L["Tick %s"]:format(subIndex),
|
||||
__order = 1,
|
||||
@@ -57,27 +60,66 @@ local function createOptions(parentData, data, index, subIndex)
|
||||
validate = WeakAuras.ValidateNumeric,
|
||||
desc = L["Enter in a value for the tick's placement."],
|
||||
},
|
||||
tick_space1 = {
|
||||
type = "description",
|
||||
tick_thickness = {
|
||||
type = "range",
|
||||
width = WeakAuras.normalWidth,
|
||||
name = "",
|
||||
name = L["Thickness"],
|
||||
order = 5,
|
||||
min = 0,
|
||||
softMax = 20,
|
||||
step = 1,
|
||||
},
|
||||
tick_extrasDescription = {
|
||||
type = "execute",
|
||||
control = "WeakAurasExpandSmall",
|
||||
name = function()
|
||||
local lengthtext = ""
|
||||
if data.automatic_length then
|
||||
lengthtext = L["|cFFFF0000Automatic|r length"]
|
||||
else
|
||||
lengthtext = L["Length of |cFFFF0000%s|r"]:format(data.tick_length)
|
||||
end
|
||||
|
||||
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 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)
|
||||
else
|
||||
texturetext = L["|cFFFF0000default|r texture"]
|
||||
end
|
||||
|
||||
local offsettext = ""
|
||||
if data.tick_xOffset ~=0 or data.tick_yOffset ~=0 then
|
||||
offsettext = L["Offset by |cFFFF0000%s|r/|cFFFF0000%s|r"]:format(data.tick_xOffset, data.tick_yOffset)
|
||||
end
|
||||
|
||||
local description = L["|cFFffcc00Extra:|r %s and %s %s"]:format(lengthtext, texturetext, offsettext)
|
||||
|
||||
return description
|
||||
end,
|
||||
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)
|
||||
end,
|
||||
image = function()
|
||||
local collapsed = WeakAuras.IsCollapsed("subtext", "subtext", "tickextras" .. index, true)
|
||||
return collapsed and "Interface\\AddOns\\WeakAuras\\Media\\Textures\\edit" or "Interface\\AddOns\\WeakAuras\\Media\\Textures\\editdown"
|
||||
end,
|
||||
imageWidth = 24,
|
||||
imageHeight = 24
|
||||
},
|
||||
automatic_length = {
|
||||
type = "toggle",
|
||||
width = WeakAuras.normalWidth,
|
||||
name = L["Automatic length"],
|
||||
order = 6,
|
||||
desc = L["Matches the height setting of a horizontal bar or width for a vertical bar."],
|
||||
},
|
||||
tick_thickness = {
|
||||
type = "range",
|
||||
width = WeakAuras.normalWidth,
|
||||
name = L["Thickness"],
|
||||
order = 7,
|
||||
min = 0,
|
||||
softMax = 20,
|
||||
step = 1,
|
||||
desc = L["Matches the height setting of a horizontal bar or width for a vertical bar."],
|
||||
hidden = hiddentickextras,
|
||||
},
|
||||
tick_length = {
|
||||
type = "range",
|
||||
@@ -88,6 +130,84 @@ local function createOptions(parentData, data, index, subIndex)
|
||||
softMax = 50,
|
||||
step = 1,
|
||||
disabled = function() return data.automatic_length end,
|
||||
hidden = hiddentickextras,
|
||||
},
|
||||
use_texture = {
|
||||
type = "toggle",
|
||||
width = WeakAuras.normalWidth,
|
||||
name = L["Use Texture"],
|
||||
order = 9,
|
||||
hidden = hiddentickextras,
|
||||
},
|
||||
tick_blend_mode = {
|
||||
type = "select",
|
||||
width = WeakAuras.normalWidth,
|
||||
name = L["Blend Mode"],
|
||||
order = 10,
|
||||
values = WeakAuras.blend_types,
|
||||
disabled = function() return not data.use_texture end,
|
||||
hidden = hiddentickextras,
|
||||
},
|
||||
tick_texture = {
|
||||
type = "input",
|
||||
name = L["Texture"],
|
||||
order = 11,
|
||||
width = WeakAuras.doubleWidth,
|
||||
disabled = function() return not data.use_texture end,
|
||||
hidden = hiddentickextras,
|
||||
},
|
||||
tick_desaturate = {
|
||||
type = "toggle",
|
||||
width = WeakAuras.normalWidth,
|
||||
name = L["Desaturate"],
|
||||
order = 12,
|
||||
hidden = hiddentickextras,
|
||||
},
|
||||
texture_chooser = {
|
||||
type = "execute",
|
||||
name = L["Choose"],
|
||||
width = WeakAuras.normalWidth,
|
||||
order = 13,
|
||||
func = function()
|
||||
WeakAuras.OpenTexturePicker(data, "tick_texture", WeakAuras.texture_types);
|
||||
end,
|
||||
disabled = function() return not data.use_texture end,
|
||||
hidden = hiddentickextras,
|
||||
},
|
||||
tick_rotation = {
|
||||
type = "range",
|
||||
width = WeakAuras.normalWidth,
|
||||
name = L["Rotation"],
|
||||
min = 0,
|
||||
max = 360,
|
||||
order = 14,
|
||||
hidden = hiddentickextras,
|
||||
},
|
||||
tick_mirror = {
|
||||
type = "toggle",
|
||||
width = WeakAuras.normalWidth,
|
||||
name = L["Mirror"],
|
||||
order = 15,
|
||||
disabled = function() return not data.use_texture end,
|
||||
hidden = hiddentickextras,
|
||||
},
|
||||
tick_xOffset = {
|
||||
type = "range",
|
||||
width = WeakAuras.normalWidth,
|
||||
name = L["x-Offset"],
|
||||
order = 16,
|
||||
softMin = -200,
|
||||
softMax = 200,
|
||||
hidden = hiddentickextras,
|
||||
},
|
||||
tick_yOffset = {
|
||||
type = "range",
|
||||
width = WeakAuras.normalWidth,
|
||||
name = L["y-Offset"],
|
||||
order = 17,
|
||||
softMin = -200,
|
||||
softMax = 200,
|
||||
hidden = hiddentickextras,
|
||||
},
|
||||
}
|
||||
return options
|
||||
|
||||
Reference in New Issue
Block a user