View Single Post
11-13-09, 09:52 AM   #9
Ither
A Firelord
 
Ither's Avatar
AddOn Author - Click to view addons
Join Date: Apr 2009
Posts: 497
Originally Posted by nightcracker View Post
You need this texture:
http://bitbucket.org/nightcracker/nc...edia/blank.tga

Ok, here it comes:
lua Code:
  1. local function CreatePanel(f, h, w, a1, p, a2, x, y)
  2.     f:SetFrameLevel(1)
  3.     f:SetHeight(h)
  4.     f:SetWidth(w)
  5.     f:SetFrameStrata("BACKGROUND")
  6.     f:SetPoint(a1, p, a2, x, y)
  7.     f:SetBackdrop( {
  8.       bgFile = "Interface\\Addons\\YourAddon\\blank",
  9.       edgeFile = "Interface\\Addons\\YourAddon\\blank",
  10.       tile = false, tileSize = 0, edgeSize = 1,
  11.       insets = { left = -1, right = -1, top = -1, bottom = -1 }
  12.     })
  13.     f:SetBackdropColor(.1,. .1, .1, 1)
  14.     f:SetBackdropBorderColor(.6, .6, .6, 1)
  15. end
  16. local f, g = CreateFrame("Frame"), CreateFrame("Frame")
  17. local ftext, gtext = f:CreateFontString(nil, "OVERLAY"), g:CreateFontString(nil, "OVERLAY")
  18. CreatePanel(f, 10, 30, "CENTER", "UIParent", "CENTER", 5, -1)
  19. f:EnableMouse(true)
  20. g:EnableMouse(true)
  21. f:SetScript("OnMouseDown", function(self, button)
  22.     f:SetBackdropColor(.2,.2,.2)
  23.     ChatFrame1:Show()
  24.     ChatFrame2:Hide()
  25.     g:SetBackdropColor(.1,.1,.1)
  26. end)
  27. g:SetScript("OnMouseDown", function(self, button)
  28.     g:SetBackdropColor(.2,.2,.2)
  29.     ChatFrame1:Show()
  30.     ChatFrame2:Hide()
  31.     f:SetBackdropColor(.1,.1,.1)
  32. end)
  33. f:SetBackdropColor(.2,.2,.2)
  34. ChatFrame1:Show()
  35. ChatFrame2:Hide()
  36. ftext:SetFont("Fonts\\FRIZQT__.TTF", 7, "MONOCHROME")
  37. ftext:SetPoint("CENTER", f)
  38. ftext:SetText("Chat")
  39. gtext:SetFont("Fonts\\FRIZQT__.TTF", 7, "MONOCHROME")
  40. gtext:SetPoint("CENTER", f)
  41. gtext:SetText("Chat")
AH. So I need to use this as an addon to make the chat channels switch?
__________________
  Reply With Quote