Skip to content

Commit

Permalink
added Reverse Fill option for Curve grow type
Browse files Browse the repository at this point in the history
  • Loading branch information
wtodom committed Oct 9, 2023
1 parent f208d8e commit 7f2a53a
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 0 deletions.
7 changes: 7 additions & 0 deletions WeakAuras/RegionTypes/DynamicGroup.lua
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ local default = {
constantFactor = "RADIUS",
frameStrata = 1,
scale = 1,
reverseFill = false,
useLimit = false,
limit = 5,
gridType = "RD",
Expand Down Expand Up @@ -821,6 +822,9 @@ local growers = {
local limit = data.useLimit and data.limit or math.huge
local sAngle = (data.rotation or 0) * math.pi / 180
local arc = (data.fullCircle and 360 or data.arcLength or 0) * math.pi / 180
if data.reverseFill then
sAngle = sAngle + arc
end
local anchorPerUnitFunc, anchorOn
if data.useAnchorPerUnit then
anchorPerUnitFunc, anchorOn = createAnchorPerUnitFunc(data)
Expand All @@ -844,6 +848,9 @@ local growers = {
else
dAngle = arc / maxVisible
end
if data.reverseFill then
dAngle = dAngle * -1
end
newPositions[frame] = {}
for i, regionData in ipairs(regionDatas) do
if i <= maxVisible then
Expand Down
8 changes: 8 additions & 0 deletions WeakAurasOptions/RegionOptions/DynamicGroup.lua
Original file line number Diff line number Diff line change
Expand Up @@ -357,6 +357,14 @@ local function createOptions(id, data)
step = 1,
hidden = function() return data.grow ~= "GRID" end,
},
-- curve grow options
reverseFill = {
type = "toggle",
order = 29,
width = WeakAuras.normalWidth,
name = L["Reverse Fill"],
hidden = function() return data.grow ~= "CURVE" end,
},
-- generic grow options
space = {
type = "range",
Expand Down

0 comments on commit 7f2a53a

Please sign in to comment.