View Single Post
07-09-11, 09:14 PM   #10
Aprikot
A Frostmaul Preserver
 
Aprikot's Avatar
AddOn Author - Click to view addons
Join Date: Feb 2010
Posts: 284
Originally Posted by Othgar View Post
This would be pretty sweet. At least two of my UI's have chat located at the top of my screen. from what I see the thread it looks like you not only have to modify the tab, but the tab when clicked and the notification glow.

Maybe something that could be coded into Nib Chat Tabs? I'll play around with it later tonight and see if I can get anything to work.
Thanks for the Nib suggestion! I'd wound up throwing Nib's text offset code into my edit of Shestak's edit of haste's Fane.

The tab titles relocate, but not the associated clickable regions (haven't figured it out yet /sigh)...

lua Code:
  1. local TabTextMoved = {}
  2. function nibchat(test)
  3.     local chat, tab, flash
  4.     for i = 1, 10 do
  5.         chat = _G["ChatFrame"..i]
  6.         tab = _G["ChatFrame"..i.."Tab"]
  7.         flash = _G["ChatFrame"..i.."TabFlash"]
  8.        
  9.         if not test then
  10.             if not TabTextMoved[i] then
  11.                 local fs = tab:GetFontString()
  12.                 local point, relativeTo, relativePoint, xOfs, yOfs = fs:GetPoint()
  13.            
  14.                 local xAdj, yAdj = 0, 0
  15.                 if IsCombatLog(chat) then
  16.                     xAdj = 0
  17.                     yAdj = -130
  18.                 else
  19.                     xAdj = 0
  20.                     yAdj = -130
  21.                 end
  22.                 fs:SetPoint(point, relativeTo, relativePoint, xOfs + xAdj, yOfs + yAdj)
  23.            
  24.                 tab:SetScript("OnEnter", ChatTab_OnEnter)
  25.                 tab:SetScript("OnLeave", ChatTab_OnLeave)
  26.                
  27.                 TabTextMoved[i] = true
  28.             end
  29.         end        
  30.     end
  31. end
  32. nibchat()
  Reply With Quote