Thread Tools Display Modes
Prev Previous Post   Next Post Next
02-01-11, 03:28 AM   #1
Coote
A Scalebane Royal Guard
 
Coote's Avatar
AddOn Author - Click to view addons
Join Date: Apr 2007
Posts: 440
Help with SetBackdrop?

I've never quite used SetBackdrop before, and typically just use CreateTexture if I'm making a background frame from scratch. I've looked through several different sources (WPanels, WoWPedia, WoWProgramming), to see how it's done, and this looks about right, but the frame doesn't even load.

If I replace the whole SetBackdrop() part with CreateTexture, it shows perfectly where I've placed it.


Code:
local cht = CreateFrame("Frame", "ChatBGFrame", UIParent)
cht:SetFrameLevel(1)
cht:SetHeight(64)
cht:SetWidth(128)
cht:SetFrameStrata("BACKGROUND")
cht:SetPoint("CENTER")
cht:SetBackdrop({
    bgFile = bg, 
    edgeFile = border, 
    tile = false, tileSize = 0, edgeSize = edgesize, 
    insets = { left = 2, right = 2, top = 4, bottom = 4 }
})
cht:SetBackdropColor(setcolor(backdrop))
cht:SetBackdropBorderColor(setcolor(bordercolor))
cht:SetAlpha(1)
end
__________________

"This is the fifteen-thousandth four hundredth and ninety-eighth occurence".
  Reply With Quote
 

WoWInterface » Developer Discussions » Lua/XML Help » Help with SetBackdrop?


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off