Skip to main content
The Icon region displays a texture with optional cooldown spiral overlay. It’s the most commonly used region type for tracking buffs, debuffs, and ability cooldowns.

Region Type

regionType = "icon"

Default Configuration

local default = {
  icon = true,
  desaturate = false,
  iconSource = -1,
  width = 64,
  height = 64,
  color = {1, 1, 1, 1},
  selfPoint = "CENTER",
  anchorPoint = "CENTER",
  anchorFrameType = "SCREEN",
  xOffset = 0,
  yOffset = 0,
  zoom = 0,
  keepAspectRatio = false,
  frameStrata = 1,
  cooldown = true,
  cooldownEdge = false
}

Functions

Color

Sets the color and alpha of the icon texture.
region:Color(r, g, b, a)
r
number
Red color component (0-1)
g
number
Green color component (0-1)
b
number
Blue color component (0-1)
a
number
Alpha transparency (0-1)
Example:
-- Set icon to red with 50% opacity
region:Color(1, 0, 0, 0.5)

ColorAnim

Sets animated color values that override the base color during animations.
region:ColorAnim(r, g, b, a)
r
number
Red color component (0-1)
g
number
Green color component (0-1)
b
number
Blue color component (0-1)
a
number
Alpha transparency (0-1)

GetColor

Returns the current color values of the icon.
local r, g, b, a = region:GetColor()
r
number
Red color component (0-1)
g
number
Green color component (0-1)
b
number
Blue color component (0-1)
a
number
Alpha transparency (0-1)

SetIcon

Sets the icon texture path manually.
region:SetIcon(iconPath)
iconPath
string
Path to the texture file or spell ID
Example:
-- Set a specific texture
region:SetIcon("Interface\\Icons\\Spell_Nature_Lightning")

-- Set by spell ID
region:SetIcon(12345)

SetIconSource

Sets which trigger state’s icon to display.
region:SetIconSource(source)
source
number
Icon source: -1 for current state, 0 for manual icon, or trigger number

UpdateIcon

Updates the displayed icon based on current icon source and state.
region:UpdateIcon()
Example:
-- Force refresh the icon display
region:UpdateIcon()

Scale

Scales the icon region by the given factors.
region:Scale(scalex, scaley)
scalex
number
Horizontal scale factor (negative values mirror horizontally)
scaley
number
Vertical scale factor (negative values mirror vertically)
Example:
-- Scale to 150% width, 200% height
region:Scale(1.5, 2.0)

-- Mirror horizontally
region:Scale(-1, 1)

SetDesaturated

Converts the icon to grayscale when enabled.
region:SetDesaturated(desaturate)
desaturate
boolean
true to desaturate (grayscale), false for full color

SetRegionWidth

Sets the base width of the icon region.
region:SetRegionWidth(width)
width
number
Width in pixels

SetRegionHeight

Sets the base height of the icon region.
region:SetRegionHeight(height)
height
number
Height in pixels

SetCooldownEdge

Enables or disables the edge highlight on the cooldown spiral.
region:SetCooldownEdge(enabled)
enabled
boolean
true to show cooldown edge, false to hide

SetZoom

Zooms the icon texture by cropping.
region:SetZoom(zoom)
zoom
number
Zoom amount (0-1, where 0 is no zoom and 1 is maximum zoom)
Example:
-- Zoom in 25%
region:SetZoom(0.25)

SetInverse

Inverts the cooldown spiral direction.
region:SetInverse(inverse)
inverse
boolean
true to invert spiral direction

UpdateValue

Updates the cooldown display based on progress value (value/total).
region:UpdateValue()

UpdateTime

Updates the cooldown display based on duration and expiration time.
region:UpdateTime()

Update

Refreshes the entire icon region including progress and icon texture.
region:Update()

PreShow

Called before the region is shown to initialize the cooldown.
region:PreShow()

SetGlow

Shows or hides all subglow subregions.
region:SetGlow(enabled)
enabled
boolean
true to show glow, false to hide
Example:
-- Enable glow effect
region:SetGlow(true)

Properties

Properties that can be dynamically changed via custom code or conditions.
PropertyTypeSetterDescription
desaturatebooleanSetDesaturatedGrayscale mode
widthnumberSetRegionWidthIcon width in pixels
heightnumberSetRegionHeightIcon height in pixels
colorcolorColorRGBA color values
inversebooleanSetInverseInvert cooldown spiral
cooldownEdgebooleanSetCooldownEdgeShow cooldown edge
zoomnumberSetZoomZoom amount (0-1)
iconSourcenumberSetIconSourceIcon source trigger
displayIconiconSetIconManual icon texture

State Values

The icon region reads these values from the trigger state:
  • state.icon - Icon texture path or spell ID
  • state.value - Current progress value
  • state.total - Total progress value
  • state.duration - Cooldown duration
  • state.expirationTime - Cooldown expiration time
  • state.inverse - Invert cooldown direction
  • state.paused - Pause cooldown animation

Masque Support

Icon regions support Masque (formerly ButtonFacade) for button skinning. The addon automatically detects Masque and applies the configured skin. Example:
-- Masque group is created automatically
-- Access via: region.MSQGroup
if region.MSQGroup then
  region.MSQGroup:SetName("My Aura Group")
end

Cooldown Frame

The cooldown frame supports pause/resume functionality:
-- Pause cooldown animation
region.cooldown:Pause()

-- Resume cooldown animation
region.cooldown:Resume()

Code Examples

Custom Icon Color Based on Health

-- In custom code trigger
function()
  local region = aura_env.region
  local healthPercent = UnitHealth("player") / UnitHealthMax("player")
  
  if healthPercent > 0.5 then
    region:Color(0, 1, 0, 1) -- Green
  elseif healthPercent > 0.25 then
    region:Color(1, 1, 0, 1) -- Yellow
  else
    region:Color(1, 0, 0, 1) -- Red
  end
end

Dynamic Icon Switching

-- Switch icons based on spec
function()
  local region = aura_env.region
  local spec = GetSpecialization()
  
  if spec == 1 then
    region:SetIcon("Interface\\Icons\\Ability_Warrior_SavageBlow")
  elseif spec == 2 then
    region:SetIcon("Interface\\Icons\\Ability_Warrior_DefensiveStance")
  else
    region:SetIcon("Interface\\Icons\\Ability_Warrior_OffensiveStance")
  end
end

Pulsing Glow on Low Time

-- In custom untrigger code
function()
  local region = aura_env.region
  if region.expirationTime then
    local remaining = region.expirationTime - GetTime()
    if remaining < 5 then
      region:SetGlow(true)
    else
      region:SetGlow(false)
    end
  end
  return false -- Don't untrigger
end

Build docs developers (and LLMs) love