SetPortraitTexture

From Wowpedia
Jump to: navigation, search

Sets a texture to a unit's 2D portrait.

SetPortraitTexture(textureObject, unitToken)

Arguments

textureObject 
widget : Texture
unitToken 
string : UnitId

Example

local f = CreateFrame("Frame")
f:SetPoint("CENTER")
f:SetSize(64, 64)

f.tex = f:CreateTexture()
f.tex:SetAllPoints(f)
SetPortraitTexture(f.tex, "player")

API SetPortraitTexture.png

Patch changes

External Links