Skip to main content

Overview

Icon displays are the most common display type, showing spell icons, textures, or custom images with optional cooldown animations, stack counts, and progress information.
Icons support Masque skinning for integration with action bar addons.

Basic Icon Configuration

{
  regionType = "icon",
  width = 64,
  height = 64,
  icon = true,
  iconSource = -1,  -- Automatic from trigger
  desaturate = false,
  zoom = 0,
  color = {1, 1, 1, 1}
}

Icon Source

{
  iconSource = -1  -- Use icon from trigger state
}
Automatically displays the spell/aura icon from trigger data.

Dimensions and Position

Size

{
  width = 64,
  height = 64,
  keepAspectRatio = false  -- Allow stretching
}

Square Icons

Set width = height for standard square icons

Custom Ratios

Disable keepAspectRatio for custom dimensions

Positioning

{
  selfPoint = "CENTER",
  anchorPoint = "CENTER",
  anchorFrameType = "SCREEN",
  xOffset = 0,
  yOffset = 0
}

Visual Effects

Desaturation

{
  desaturate = true  -- Grayscale icon
}
Use desaturation with conditions to show cooldown state visually.

Color Tinting

{
  color = {1, 0, 0, 1}  -- Red tint (R, G, B, A)
}

Zoom

{
  zoom = 0.3  -- Zoom in 30% (range 0-1)
}
High zoom values may crop the icon edges.

Alpha/Opacity

{
  alpha = 0.8  -- 80% opacity
}

Cooldown Sweep

The iconic circular cooldown animation:
{
  cooldown = true,         -- Enable cooldown display
  cooldownEdge = false,    -- Smooth edge (vs. sharp)
  inverse = false          -- Sweep direction
}

Cooldown Behavior

{
  progressSource = {-1, ""}  -- Use trigger progress
}
Cooldown automatically syncs with trigger duration/expirationTime.
{
  progressSource = {0, "auto", 50, 100}  -- value, total
}
Set custom progress values.
{
  inverse = true  -- Sweep opposite direction
}

Masque Integration

Icons work with Masque addon for skinning:
-- Masque is detected automatically
-- Configure through Masque addon interface
Masque must be installed separately. WeakAuras registers icons as “WA_Aura” type.

Inner and Outer Regions

For sub-region anchoring:
-- Anchor to inner area (inside icon border)
{
  anchorPoint = "INNER_CENTER"  
}

-- Anchor to outer area (outside icon)
{
  anchorPoint = "OUTER_TOPRIGHT"
}

Texture Coordinates

For advanced texture manipulation:
-- Get texture coordinates with zoom
local function GetTexCoord(region, texWidth, aspectRatio, xOffset, yOffset)
  -- Returns: ULx, ULy, LLx, LLy, URx, URy, LRx, LRy
end

Sub-Regions

Icons support various sub-regions:

Text Overlays

Display text on the icon (stacks, name, etc.)

Glow Effects

Add glow animations around the icon

Bar Overlays

Overlay progress bars on the icon

Model Overlays

Display 3D models on the icon

Common Patterns

Buff/Debuff Tracker

{
  regionType = "icon",
  width = 48,
  height = 48,
  iconSource = -1,  -- Auto from trigger
  cooldown = true,
  alpha = 1.0,
  
  -- Stack text sub-region
  subRegions = {{
    type = "subtext",
    text_text = "%s",  -- Stack count
    text_fontSize = 16
  }}
}

Cooldown Monitor

{
  regionType = "icon",
  width = 64,
  height = 64,
  iconSource = -1,
  cooldown = true,
  cooldownEdge = false,
  
  -- Desaturate when on cooldown
  conditions = {{
    check = {
      trigger = 1,
      variable = "onCooldown",
      op = "==",
      value = 1
    },
    changes = {{
      property = "desaturate",
      value = true
    }}
  }}
}

Resource Indicator

{
  regionType = "icon",
  width = 48,
  height = 48,
  displayIcon = "Interface\\\\Icons\\\\Spell_Holy_InnerFire",
  cooldown = false,  -- No cooldown sweep
  
  -- Color based on value
  conditions = {{
    check = {
      trigger = 1,
      variable = "value",
      op = "<",
      value = 20
    },
    changes = {{
      property = "color",
      value = {1, 0, 0, 1}  -- Red when low
    }}
  }}
}

Proc Notification

{
  regionType = "icon",
  width = 96,
  height = 96,
  iconSource = -1,
  zoom = 0.1,
  
  -- Animations
  animation = {
    start = {
      type = "preset",
      preset = "grow",
      duration = 0.2
    },
    main = {
      type = "preset",
      preset = "pulse"
    }
  }
}

Properties Reference

Modifiable via Conditions

PropertyTypeDescription
desaturatebooleanGrayscale effect
widthnumberIcon width in pixels
heightnumberIcon height in pixels
colorcolorRGBA color tint
inversebooleanReverse cooldown direction
zoomnumberZoom level (0-1)
iconSourcelistIcon source selection
displayIconiconManual icon path
cooldownEdgebooleanSmooth cooldown edge

Advanced Techniques

Custom Icon Function

-- In custom trigger
function icon()
  local health = UnitHealth("player")
  local maxHealth = UnitHealthMax("player")
  local percent = (health / maxHealth) * 100
  
  if percent < 25 then
    return "Interface\\\\Icons\\\\Spell_ChargeNegative"
  elseif percent < 50 then
    return "Interface\\\\Icons\\\\Spell_ChargeNeutral"
  else
    return "Interface\\\\Icons\\\\Spell_ChargePositive"
  end
end

Dynamic Zoom

-- Condition: Zoom based on stacks
{
  check = {
    trigger = 1,
    variable = "stacks",
    op = ">=",
    value = 5
  },
  changes = {{
    property = "zoom",
    value = 0.2  -- Zoom when stacked
  }}
}

Texture Rotation

Icons support rotation via animations:
{
  animation = {
    main = {
      type = "custom",
      use_rotate = true,
      rotate = 360,
      duration_type = "seconds",
      duration = 2
    }
  }
}

Performance Considerations

Icons only update when state changes. Avoid FRAME_UPDATE triggers unless necessary.
Custom textures are loaded once and cached. Use consistent paths.
Cooldown sweeps use native WoW cooldown frames for efficiency.

Troubleshooting

  • Verify iconSource is set correctly
  • Check texture path is valid
  • Ensure trigger provides icon data if using auto
  • Check alpha is not 0
  • Enable cooldown = true
  • Verify progressSource is configured
  • Check trigger provides duration/expirationTime
  • Ensure progressType is “timed”
  • Adjust width/height to match
  • Enable keepAspectRatio if desired
  • Check zoom level

Best Practices

Progress Bar

Alternative display for progress

Text Display

Add text overlays

Animations

Animate icon displays

Build docs developers (and LLMs) love