You need this texture:
http://bitbucket.org/nightcracker/nc...edia/blank.tga
Ok, here it comes:
lua Code:
local function CreatePanel(f, h, w, a1, p, a2, x, y)
f:SetFrameLevel(1)
f:SetHeight(h)
f:SetWidth(w)
f:SetFrameStrata("BACKGROUND")
f:SetPoint(a1, p, a2, x, y)
f:SetBackdrop( {
bgFile = "Interface\\Addons\\YourAddon\\blank",
edgeFile = "Interface\\Addons\\YourAddon\\blank",
tile = false, tileSize = 0, edgeSize = 1,
insets = { left = -1, right = -1, top = -1, bottom = -1 }
})
f:SetBackdropColor(.1,. .1, .1, 1)
f:SetBackdropBorderColor(.6, .6, .6, 1)
end
local f, g = CreateFrame("Frame"), CreateFrame("Frame")
local ftext, gtext = f:CreateFontString(nil, "OVERLAY"), g:CreateFontString(nil, "OVERLAY")
CreatePanel(f, 10, 30, "CENTER", "UIParent", "CENTER", 5, -1)
f:EnableMouse(true)
g:EnableMouse(true)
f:SetScript("OnMouseDown", function(self, button)
f:SetBackdropColor(.2,.2,.2)
ChatFrame1:Show()
ChatFrame2:Hide()
g:SetBackdropColor(.1,.1,.1)
end)
g:SetScript("OnMouseDown", function(self, button)
g:SetBackdropColor(.2,.2,.2)
ChatFrame1:Show()
ChatFrame2:Hide()
f:SetBackdropColor(.1,.1,.1)
end)
f:SetBackdropColor(.2,.2,.2)
ChatFrame1:Show()
ChatFrame2:Hide()
ftext:SetFont("Fonts\\FRIZQT__.TTF", 7, "MONOCHROME")
ftext:SetPoint("CENTER", f)
ftext:SetText("Chat")
gtext:SetFont("Fonts\\FRIZQT__.TTF", 7, "MONOCHROME")
gtext:SetPoint("CENTER", f)
gtext:SetText("Chat")