Refactor progress handling

probably some regressions
This commit is contained in:
NoM0Re
2025-01-22 03:37:10 +01:00
parent a643b275ba
commit 23c7da5ea6
29 changed files with 2037 additions and 1263 deletions
+4 -6
View File
@@ -36,7 +36,7 @@ local function createOptions(id, data)
displayIcon = {
type = "input",
width = WeakAuras.normalWidth - 0.15,
name = L["Fallback Icon"],
name = L["Manual Icon"],
order = 4,
get = function()
return data.displayIcon and tostring(data.displayIcon) or "";
@@ -230,8 +230,7 @@ local function createOptions(id, data)
name = L["Enable Swipe"],
order = 11.1,
desc = L["Enable the \"Swipe\" radial overlay"],
disabled = function() return not OptionsPrivate.Private.CanHaveDuration(data); end,
get = function() return OptionsPrivate.Private.CanHaveDuration(data) and data.cooldown; end
get = function() return data.cooldown; end
},
inverse = {
type = "toggle",
@@ -239,8 +238,7 @@ local function createOptions(id, data)
name = L["Inverse"],
order = 11.2,
desc = L["Invert the direction of progress"],
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,
get = function() return data.inverse and data.cooldown; end,
hidden = function() return not data.cooldown end
},
cooldownEdge = {
@@ -249,7 +247,6 @@ local function createOptions(id, data)
name = L["Show \"Edge\""],
order = 11.4,
desc = "|TInterface\\AddOns\\WeakAuras\\Media\\Textures\\edge-example:30|t\n"..L["Enable \"Edge\" part of the overlay"],
disabled = function() return not OptionsPrivate.Private.CanHaveDuration(data) end,
hidden = function() return not data.cooldown end,
},
endHeader = {
@@ -276,6 +273,7 @@ local function createOptions(id, data)
return {
icon = options,
progressOptions = OptionsPrivate.commonOptions.ProgressOptions(data),
position = OptionsPrivate.commonOptions.PositionOptions(id, data),
};
end