Thread Tools Display Modes
12-10-23, 03:01 AM   #1
dragonflyy
An Aku'mai Servant
 
dragonflyy's Avatar
AddOn Author - Click to view addons
Join Date: Nov 2006
Posts: 32
BackdropTemplate issue

I have run into an issue and wondering if I'm messing something up or if backdroptemplate for some reason doesn't support setting Points properly.

For testing I created this frame:
Lua Code:
  1. local frame = CreateFrame("Frame", nil, UIParent, "BackdropTemplate")
  2. frame:SetBackdrop({
  3.    bgFile="Interface/FrameGeneral/UI-Background-Rock"
  4. })
  5. frame:SetSize(200,200)
  6. frame:SetPoint("CENTER")

This shows the frame with the background just fine.

Now if I do this a little different:
Lua Code:
  1. local frame = CreateFrame("Frame", nil, UIParent, "BackdropTemplate")
  2. frame:SetBackdrop({
  3.    bgFile="Interface/FrameGeneral/UI-Background-Rock"
  4. })
  5. frame:SetPoint("CENTER", -50, 50)
  6. frame:SetPoint("CETNER", 50, -50)
Nothing shows up, the frame creates but it doesn't draw. If I then set the size it does show up, but I want this frame inside another to always be properly set. My actual frame is:
Lua Code:
  1. L.ToyboxFrame.Title = CreateFrame("Frame", "$parent_Title", L.ToyboxFrame, "BackdropTemplate")
  2. L.ToyboxFrame.Title:SetBackdrop({
  3.     bgFile="Interface/FrameGeneral/UI-Background-Rock"
  4. })
  5. L.ToyboxFrame.Title:SetPoint("TOPLEFT", 0, 0)
  6. L.ToyboxFrame.Title:SetPoint("TOPRIGHT", 0, -20)

But again, nothing shows up. Is there something I'm missing, or does BackdropTemplate not work with setting more than one point?

Also the Parent:
Lua Code:
  1. L.ToyboxFrame = CreateFrame("Frame", "ToyJunkie_ToyboxFrame", UIParent, "BackdropTemplate")
  2. L.ToyboxFrame:SetBackdrop({
  3.     bgFile="Interface/FrameGeneral/UI-Background-Marble",
  4.       edgeFile="Interface/Tooltips/UI-Tooltip-Border",
  5.       edgeSize = 16,
  6.       insets = { left = 4, right = 4, top = 4, bottom = 4 }
  7. })
  8.  
  9. L.ToyboxFrame.isMoving = false
  10. L.ToyboxFrame:SetSize(300,200)
  11. L.ToyboxFrame:SetPoint("LEFT", 100, 0)
  12. L.ToyboxFrame:RegisterForDrag("LeftButton")
  13. L.ToyboxFrame:SetMovable(true)
  14. L.ToyboxFrame:EnableMouse(true)
  15.  
  16. --Scripts are not shown
  Reply With Quote
12-10-23, 03:26 AM   #2
dragonflyy
An Aku'mai Servant
 
dragonflyy's Avatar
AddOn Author - Click to view addons
Join Date: Nov 2006
Posts: 32
Okay so. I figured it out on my own. I am a dunce. I was not setting the proper points and a relative point. I've solved it, please go about your business.
  Reply With Quote

WoWInterface » AddOns, Compilations, Macros » AddOn Help/Support » BackdropTemplate issue


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