And here is your XML file as Lua code instead. (with tables expanded vertically for ease of reading)
Lua Code:
local luaFrame = CreateFrame("Frame", "UnneccessaryGlobalFrameName", "UIParent")
luaFrame:SetWidth(400)
luaFrame:SetHeight(400)
luaFrame:SetPoint("CENTER")
luaFrame:SetBackdrop({
bgFile = "Interface\\DialogFrame\\UI-DialogBox-Background",
edgeFile = "Interface\\DialogFrame\\UI-DialogBox-Border",
tile = true, tileSize = 32,
edgeSize = 32,
insets = {
left = 11,
right = 12,
top = 12,
bottom = 11
}
})
local titleBorder = luaFrame:CreateTexture("UnneccessaryGlobalFrameNameTitleBorder")
titleBorder:SetWidth(160)
titleBorder:SetHeight(32)
titleBorder:SetPoint("TOP", luaFrame, "TOP", 0, 5)
titleBorder:SetTexture("Interface\\DialogFrame\\UI-DialogBox-Header")
titleBorder:SetTexCoord(.2, .8, 0, .6)
titleBorder:Hide() --not sure why you're hiding it, but okay...
local titleString = luaFrame:CreateFontString("UnneccessaryGlobalFrameNameTitleString")
titleString:SetFont("Fonts\\FRIZQT__.TTF", 12)
titleString:SetWidth(140)
titleString:SetPoint("TOP", luaFrame, "TOP", 0, -4)
titleString:SetTextColor(1, 0.8196079, 0)
titleString:SetShadowOffset(1, -1)
titleString:SetShadowColor(0, 0, 0)
titleString:Hide() --again, not sure why you're hiding it...
--note: you never gave your fontstring text...
--titleString:SetText("This is my frame's title.")
And you can add this right below that.
Lua Code:
luaFrame:RegisterEvent("ADDON_LOADED")
luaFrame:SetScript("OnEvent", function(self, event, name)
if name == "XMLbeforeLUA" then
print(event)
print(self:GetName())
self:Hide() --don't hide your frame when seeing if things load - how do you know it works? This might be how your fontstring ended up with no text. ;)
end
end)
print("Lua loaded")
(BTW, it's Lua, not LUA. It's Portuguese for "moon", not an acronym.)
(Oh, and also semi-colons are totally unnecessary in Lua.
)