Overview
Texture displays show static or dynamic textures, perfect for backgrounds, borders, decorative elements, and custom UI components.
Texture displays are essentially simplified progress bars without progress tracking.
Basic Configuration
{
regionType = "texture",
texture = "Interface\\\\Buttons\\\\WHITE8X8",
color = {1, 1, 1, 1},
width = 200,
height = 100,
desaturate = false,
blendMode = "BLEND"
}
Texture Selection
WoW Interface Textures
{
texture = "Interface\\\\Buttons\\\\WHITE8X8", -- Solid color
texture = "Interface\\\\DialogFrame\\\\UI-DialogBox-Background", -- Frame bg
texture = "Interface\\\\Tooltips\\\\UI-Tooltip-Background" -- Tooltip bg
}
SharedMedia Textures
{
texture = "Blizzard Tooltip", -- LSM texture name
texture = "Solid" -- Solid fill
}
Custom Textures
{
texture = "Interface\\\\AddOns\\\\MyAddon\\\\Textures\\\\Custom.tga"
}
Custom textures must be in TGA or BLP format and placed in your AddOns folder.
Color and Effects
Color Tint
{
color = {1, 0, 0, 0.5} -- Semi-transparent red (R, G, B, A)
}
Desaturation
{
desaturate = true -- Convert to grayscale
}
Blend Modes
{
blendMode = "BLEND" -- Normal blending
}
Standard alpha blending.{
blendMode = "ADD" -- Additive blending
}
Brightens underlying pixels.{
blendMode = "MOD" -- Multiply blending
}
Darkens underlying pixels.{
blendMode = "ALPHAKEY" -- Alpha keying
}
Binary transparency.
Size and Position
{
width = 200,
height = 100,
selfPoint = "CENTER",
anchorPoint = "CENTER",
anchorFrameType = "SCREEN",
xOffset = 0,
yOffset = 0
}
Texture Coordinates
For displaying portions of textures:
-- Custom texture coordinates (advanced)
-- ULx, ULy, LLx, LLy, URx, URy, LRx, LRy
texture:SetTexCoord(0, 0, 0, 1, 1, 0, 1, 1)
Texture coordinates range from 0 to 1, where (0,0) is top-left and (1,1) is bottom-right.
Common Patterns
Solid Background
{
regionType = "texture",
texture = "Interface\\\\Buttons\\\\WHITE8X8",
color = {0, 0, 0, 0.8}, -- Black, 80% opacity
width = 300,
height = 200,
// Behind other elements
frameStrata = 1 -- LOW
}
Border Effect
{
regionType = "texture",
texture = "Interface\\\\DialogFrame\\\\UI-DialogBox-Border",
color = {1, 1, 1, 1},
width = 256,
height = 256,
blendMode = "BLEND"
}
Glow Effect
{
regionType = "texture",
texture = "Interface\\\\Buttons\\\\WHITE8X8",
color = {1, 0.5, 0, 0.3}, -- Orange glow
width = 150,
height = 150,
blendMode = "ADD", -- Additive for glow
// Animate
animation = {
main = {
type = "preset",
preset = "pulse"
}
}
}
Status Indicator
{
regionType = "texture",
texture = "Interface\\\\Buttons\\\\WHITE8X8",
width = 20,
height = 20,
// Change color based on state
conditions = {
{
check = {
trigger = 1,
variable = "show",
op = "==",
value = 1
},
changes = {{
property = "color",
value = {0, 1, 0, 1} // Green when active
}}
}
}
}
Decorative Element
{
regionType = "texture",
texture = "Interface\\\\Glues\\\\CharacterCreate\\\\UI-CharacterCreate-Factions",
width = 64,
height = 64,
color = {1, 1, 1, 1},
desaturate = false
}
Dynamic Textures
Change textures via conditions:
{
conditions = {
{
check = {
trigger = 1,
variable = "stacks",
op = ">=",
value = 5
},
changes = {{
property = "texture",
value = "Interface\\\\Buttons\\\\WHITE8X8"
}}
}
}
}
Texture changes via conditions allow creating dynamic visual indicators.
Texture Wrapping
For tiled textures:
-- Set wrap mode (requires custom code)
texture:SetHorizTile(true)
texture:SetVertTile(true)
Properties Reference
Modifiable via Conditions
| Property | Type | Description |
|---|
color | color | RGBA color tint |
desaturate | boolean | Grayscale effect |
width | number | Texture width |
height | number | Texture height |
texture | texture | Texture path |
Texture Formats
TGA
Targa Image File
- Supports alpha channel
- Uncompressed
- Best for custom textures
BLP
Blizzard Picture
- Blizzard’s format
- Compressed
- Used for game textures
Use power-of-2 dimensions (64x64, 128x128, 256x256) for optimal memory usage.
Each unique texture loads into memory. Reuse textures when possible.
Additive and multiply blend modes may impact performance with many overlapping textures.
Troubleshooting
- Verify texture path is correct (case-sensitive)
- Check texture file exists
- Ensure alpha is not 0
- Verify texture is in TGA or BLP format
- Adjust width/height to match texture aspect ratio
- Use keepAspectRatio if available
- Check texture coordinate settings
- Check color RGBA values
- Verify blend mode
- Check desaturate setting
Best Practices
Common Texture Paths
Backgrounds
"Interface\\\\Buttons\\\\WHITE8X8" -- Solid color
"Interface\\\\DialogFrame\\\\UI-DialogBox-Background"
"Interface\\\\Tooltips\\\\UI-Tooltip-Background"
"Interface\\\\FrameGeneral\\\\UI-Background-Rock"
Borders
"Interface\\\\DialogFrame\\\\UI-DialogBox-Border"
"Interface\\\\Tooltips\\\\UI-Tooltip-Border"
"Interface\\\\FrameGeneral\\\\UIFrameInnards"
Effects
"Interface\\\\Glues\\\\Models\\\\UI_"
"Interface\\\\Spellbook\\\\UI-Glyph-Rune"
"Interface\\\\QuestFrame\\\\UI-QuestLog-BookIcon"
Progress Bar
Textured progress displays
Icon Display
Icon-specific features
Conditions
Dynamic texture changes