Files
WeakestAuras/SubBackground.lua
T
github-actions[bot] 552e1704a1 WeakestAuras 0.13.0
WeakestAuras 0.13.0

Radial cooldown swipe and circular progress

- An icon's cooldown swipe is drawn as a real radial wedge instead of a 3D
  model, and holds its position while a trigger is paused.
- Icons gain Swipe Color, Cooldown Edge and Cooldown Edge Color, all three
  usable in conditions.
- Progress Texture auras take the two circular orientations, Fills Clockwise
  and Fills Anticlockwise, with Start angle, End angle and crop.
- Both need ClassicAPI 1.10.0 or newer. On an older one an icon keeps the model
  swipe and does not offer the three colour options, and a circular Progress
  Texture displays the unsupported-region message.

Icons and rotation in text

- %i renders the trigger's icon inline, Money draws coins, and {rt1} to {rt8}
  become raid markers.
- Text sub-regions take a Rotation.
- Text scales past the client's font ceiling, and the Size fields accept a
  value above the slider's range.
- The text features above need ClassicAPI 1.10.0 or newer and fall back to
  plain text without it. A marker's name is not turned back into {rtN}.

Previewing an aura

- Selecting an aura previews it by running its triggers: a dynamic group shows
  its real ordering, limits and stagger, a multi-unit trigger one clone per
  member, and custom trigger code the clones it actually produces.
- An aura with custom trigger code can ignore Lua errors thrown while
  previewing, from its Info tab.

Dynamic groups

- Clockwise and Counter Clockwise grows, with Constant Factor, Start Angle,
  Radius, Angle Between Auras, Full Circle and Total Angle.

Display effects

- The region's own art has a Background row in the effects list, so a glow or
  border can be moved below the icon it rings.

Filters that hold several values

- The Class, Race, Faction and Group Type load conditions each offer Ignored,
  One Of and Any Of.
- The Instance Type, Stance/Form, Classification and Item Subclass trigger
  filters take a set of values.
- Stance/Form matches the shapeshift bar position WeakAuras2 stores, and can be
  inverted.
- Unit Characteristics accepts a group, party, raid or nameplate unit and
  produces one state per member.

Fixes

- Auras are no longer wiped on login after a session in which the addon refused
  to run for a missing client mod.
- A trigger naming a spell whose name ends in parentheses, such as Faerie Fire
  (Feral), resolves to that spell instead of the one without the suffix.
- Item Cooldown and Equipment Slot Cooldown gain the Show Global Cooldown
  toggle Spell Cooldown had, and the global cooldown is kept out of a cooldown
  trigger's duration, remaining time and progress rather than only out of
  whether it shows.
- An aura exported by a newer WeakestAuras imports with a warning instead of
  being refused; settings the newer version added are lost, the rest arrives.

- The options footer lists what an out-of-date ClassicAPI, SuperWoW or Nampower
  is costing you, with a download link for each.
2026-08-20 08:44:14 +00:00

41 lines
1.6 KiB
Lua

-- WeakestAuras -- the "subbackground" sub-region: the region's own art, given a
-- row in the Display Effects list. Mirrors WA2's Background (§8).
-- Upstream section refs (§N) point at design/architecture/weakauras2-reference.md
--
-- Draws nothing, and is not a backdrop despite the name. Draw order comes off an
-- entry's position in data.subRegions, so without a row standing for the region
-- itself there is no way to say "below the icon" -- every effect would sit above
-- it forever. This row's SetFrameLevel retargets the parent region, which is
-- what moving it up or down the list actually does.
--
-- `enforced`: MergeDefaults keeps exactly one on every aura that supports it,
-- and the options list offers neither add, delete nor duplicate. Upstream
-- expresses the same thing as supportsAdd = false plus an options block with no
-- __delete/__duplicate and a __notcollapsable.
if WeakestAuras.disabled then return end
local WA = WeakestAuras
WA.RegisterSubRegionType("subbackground", {
displayName = "Background",
supports = function(regionType)
return regionType ~= "group" and regionType ~= "dynamicgroup"
end,
enforced = true,
default = { type = "subbackground" },
create = function(parent)
local region = { parent = parent }
function region:SetFrameLevel(level) self.parent:SetFrameLevel(level) end
return region
end,
modify = function(parent, region)
region.parent = parent
end,
-- A header and nothing under it. The arrows live on the header, which the
-- options list paints for every effect.
options = function()
return {}
end,
})