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:
local frame = CreateFrame("Frame", nil, UIParent, "BackdropTemplate")
frame:SetBackdrop({
bgFile="Interface/FrameGeneral/UI-Background-Rock"
})
frame:SetSize(200,200)
frame:SetPoint("CENTER")
This shows the frame with the background just fine.
Now if I do this a little different:
Lua Code:
local frame = CreateFrame("Frame", nil, UIParent, "BackdropTemplate")
frame:SetBackdrop({
bgFile="Interface/FrameGeneral/UI-Background-Rock"
})
frame:SetPoint("CENTER", -50, 50)
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:
L.ToyboxFrame.Title = CreateFrame("Frame", "$parent_Title", L.ToyboxFrame, "BackdropTemplate")
L.ToyboxFrame.Title:SetBackdrop({
bgFile="Interface/FrameGeneral/UI-Background-Rock"
})
L.ToyboxFrame.Title:SetPoint("TOPLEFT", 0, 0)
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:
L.ToyboxFrame = CreateFrame("Frame", "ToyJunkie_ToyboxFrame", UIParent, "BackdropTemplate")
L.ToyboxFrame:SetBackdrop({
bgFile="Interface/FrameGeneral/UI-Background-Marble",
edgeFile="Interface/Tooltips/UI-Tooltip-Border",
edgeSize = 16,
insets = { left = 4, right = 4, top = 4, bottom = 4 }
})
L.ToyboxFrame.isMoving = false
L.ToyboxFrame:SetSize(300,200)
L.ToyboxFrame:SetPoint("LEFT", 100, 0)
L.ToyboxFrame:RegisterForDrag("LeftButton")
L.ToyboxFrame:SetMovable(true)
L.ToyboxFrame:EnableMouse(true)
--Scripts are not shown