Wowpedia

We have moved to Warcraft Wiki. Click here for information and the new URL.

READ MORE

Wowpedia
Advertisement

Sets the backdrop texture of a frame.

Frame:SetBackdrop(nil or { -- defaults
	bgFile = "bgFile",
	edgeFile = "edgeFile",
	tile = false,
	tileEdge = false,
	tileSize = 0,
	edgeSize = 32,
	insets = { left = 0, right = 0, top = 0, bottom = 0 }
})

Arguments[]

bgFile
string - Texture path to use for the background
edgeFile
string - Texture path to use for the edges
tile
boolean - True if the background texture should tile, false if it should stretch
tileSize
number - If tile is true, size of each tiled copy of the bgFile
tileEdge
boolean
edgeSize
number - Size of the edgeFile (i.e. border thickness and corner size)
insets - left, right, top, bottom
number - How far from the edges the background will be drawn (e.g. use higher values for thicker edges)

Details[]

  • Passing nil as the only argument removes the backdrop.

Example[]

Sets a backdrop with UI-Tooltip-Background and UI-Tooltip-Border (FrameXML example).

API Frame SetBackdrop

Backdrop colored blue, 50% transparency

local f = CreateFrame("Frame", nil, UIParent, "BackdropTemplate")
f:SetPoint("CENTER")
f:SetSize(128, 128)
f:SetBackdrop({
	bgFile = "Interface/Tooltips/UI-Tooltip-Background",
	edgeFile = "Interface/Tooltips/UI-Tooltip-Border",
	edgeSize = 16,
	insets = { left = 4, right = 4, top = 4, bottom = 4 },
})
f:SetBackdropColor(0, 0, 1, .5)

Patch changes[]

See also[]

References[]

 
  1. ^ a b Daniel Yates (MeoInv g fishingbobber 05rawr). 9.0.1 Consolidated UI Changes: Backdrop System Changes.
  2. ^ Backdrop.xml, patch 9.0.1, archived at Townlong-Yak
  3. ^ Blizzard Entertainment Slouken. Re: Upcoming 1.7 Changes - Concise List. Archived from the original
Advertisement