PHP код:
do
local n = {
"Тренировочный манекен",
"Древо войны",
"Ястребиная сова",
}
local f,x = CreateFrame("frame",'-=T=-',UIParent),24
f:SetSize(140, 100)
f:SetPoint("CENTER")
f:SetMovable(true); f:SetClampedToScreen(true); f:EnableMouse(true)
f:SetScript("OnMouseDown",function(self,button) self:StartMoving() end)
f:SetScript("OnMouseUp",function(self,button) self:StopMovingOrSizing() end)
f:SetBackdrop({
bgFile = "Interface\\DialogFrame\\UI-DialogBox-Background",
edgeFile = "Interface\\DialogFrame\\UI-DialogBox-Border",
edgeSize = 32, tile = true, tileSize = 32, insets={left = 11, right = 12, top = 12, bottom = 11}
})
f.h = f:CreateTexture(nil,"ARTWORK")
f.h:SetSize(171,44)
f.h:SetPoint('top',0,5)
f.h:SetTexture("Interface\\DialogFrame\\UI-DialogBox-Header")
f.ht = f:CreateFontString(nil,"ARTWORK","GameFontNormal")
f.ht:SetPoint('top',f.h,0,-8)
f.ht:SetText("-=T=-")
for _,v in ipairs(n) do
local b = CreateFrame("Button", nil, f, "SecureActionButtonTemplate, GameMenuButtonTemplate")
b:GetRegions():SetSize(100,12); b:SetText(v)
b:GetNormalTexture():SetVertexColor(.7,.7,.7)
b:SetAttribute("type", "macro");
b:SetAttribute("macrotext", "/target "..v)
b:SetSize(120,20)
b:SetPoint("top",f,"top",0,-x) x=x+22
f:SetSize(140, x+12)
end
end