Originally Posted by Fizzlemizz
You seem to want the XML to be parented to the .lua frame so probably more like:
Lua Code:
local Incoming = CreateFrame("Frame", "SharpedgeFrame", UIParent, BackdropTemplateMixin and "BackdropTemplate"); Incoming:SetBackdrop({ bgFile="Interface\\DialogFrame\\UI-DialogBox-Background", edgeFile="Interface\\DialogFrame\\UI-DialogBox-Border", tile=1, tileSize=32, edgeSize=32, insets={left=11, right=12, top=12, bottom=11} }) Incoming:Hide() LocationMessageView:Show() LocationMessageView:SetParent(Incoming) LocationMessageView:ClearAllPoints() LocationMessageView:SetPoint("TOP") Incoming:SetWidth(139) Incoming:SetHeight(190) Incoming:SetPoint("CENTER",UIParent) Incoming:EnableMouse(true) Incoming:SetMovable(true) Incoming:RegisterForDrag("LeftButton") Incoming:SetScript("OnDragStart", function(self) self:StartMoving() end) Incoming:SetScript("OnDragStop", function(self) self:StopMovingOrSizing() end) Incoming:SetFrameStrata("FULLSCREEN_DIALOG") local button = CreateFrame("button","IncomingButton", Incoming, "UIPanelButtonTemplate") button:SetHeight(24) button:SetWidth(60) button:SetPoint("BOTTOM", Incoming, "BOTTOM", 0, 10) button:SetText("Close") button:SetScript("OnClick", function(self) self:GetParent():Hide() end)
and you would show/hide SharpedgeFrame in your slash command
I'm assuming the load order of the files based on their order in your OP.
|
Its throwing an error: attempt to index global 'LocationMessageView; (a nil value)