WoWInterface

WoWInterface (https://www.wowinterface.com/forums/index.php)
-   AddOn Help/Support (https://www.wowinterface.com/forums/forumdisplay.php?f=3)
-   -   BackdropTemplate issue (https://www.wowinterface.com/forums/showthread.php?t=59730)

dragonflyy 12-10-23 03:01 AM

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

dragonflyy 12-10-23 03:26 AM

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.


All times are GMT -6. The time now is 01:13 PM.

vBulletin © 2024, Jelsoft Enterprises Ltd
© 2004 - 2022 MMOUI