View Single Post
09-16-22, 08:32 PM   #6
Fizzlemizz
I did that?
 
Fizzlemizz's Avatar
Premium Member
AddOn Author - Click to view addons
Join Date: Dec 2011
Posts: 1,879
You seem to want the XML to be parented to the .lua frame so probably more like:


Lua Code:
  1. local Incoming = CreateFrame("Frame", "SharpedgeFrame", UIParent, BackdropTemplateMixin and "BackdropTemplate");
  2. Incoming:SetBackdrop({
  3.       bgFile="Interface\\DialogFrame\\UI-DialogBox-Background",
  4.       edgeFile="Interface\\DialogFrame\\UI-DialogBox-Border",
  5.       tile=1, tileSize=32, edgeSize=32,
  6.       insets={left=11, right=12, top=12, bottom=11}
  7. })
  8. Incoming:Hide()
  9. LocationMessageView:Show()
  10. LocationMessageView:SetParent(Incoming)
  11. LocationMessageView:ClearAllPoints()
  12. LocationMessageView:SetPoint("TOP")
  13. Incoming:SetWidth(139)
  14. Incoming:SetHeight(190)
  15. Incoming:SetPoint("CENTER",UIParent)
  16. Incoming:EnableMouse(true)
  17. Incoming:SetMovable(true)
  18. Incoming:RegisterForDrag("LeftButton")
  19. Incoming:SetScript("OnDragStart", function(self) self:StartMoving() end)
  20. Incoming:SetScript("OnDragStop", function(self) self:StopMovingOrSizing() end)
  21. Incoming:SetFrameStrata("FULLSCREEN_DIALOG")
  22.  
  23. local button = CreateFrame("button","IncomingButton", Incoming, "UIPanelButtonTemplate")
  24. button:SetHeight(24)
  25. button:SetWidth(60)
  26. button:SetPoint("BOTTOM", Incoming, "BOTTOM", 0, 10)
  27. button:SetText("Close")
  28. 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.
__________________
Fizzlemizz
Maintainer of Discord Unit Frames and Discord Art.
Author of FauxMazzle, FauxMazzleHUD and Move Pad Plus.

Last edited by Fizzlemizz : 09-16-22 at 08:36 PM.
  Reply With Quote