I went to ChatGPT
https://chat.openai.com/ and asked them to convert the xml code to lua and the code below is the result.
Lua Code:
local frame = CreateFrame("Frame", "SimpleFrame", UIParent, "BasicFrameTemplateWithInset")
frame:SetSize(150, 150)
frame:SetPoint("CENTER")
local closeButton = CreateFrame("Button", nil, frame, "UIPanelCloseButton")
closeButton:SetPoint("TOPRIGHT", -4, -4)
local insetFrame = CreateFrame("Frame", nil, frame, "InsetFrameTemplate")
insetFrame:SetPoint("TOPLEFT", 10, -26)
insetFrame:SetPoint("BOTTOMRIGHT", -6, 26)
local okButton = CreateFrame("Button", nil, frame, "UIPanelButtonTemplate")
okButton:SetText("Okay")
okButton:SetSize(90, 22)
okButton:SetPoint("BOTTOMRIGHT", -6, 4)
okButton:SetScript("OnClick", function()
frame:Hide()
end)
frame:SetScript("OnLoad", function()
frame.TitleText:SetText("Simple Frame")
end)