CHAT_FRAME_TAB_SELECTED_MOUSEOVER_ALPHA = 1.0
CHAT_FRAME_TAB_SELECTED_NOMOUSE_ALPHA = 0.5 -- set to 0 if u want to hide the tabs when no mouse is over them or the chat
CHAT_FRAME_TAB_NORMAL_MOUSEOVER_ALPHA = 0.5
CHAT_FRAME_TAB_NORMAL_NOMOUSE_ALPHA = 0.1 -- set to 0 if u want to hide the tabs when no mouse is over them or the chat
CHAT_FRAME_FADE_OUT_TIME = 0.5
CHAT_FRAME_FADE_TIME = 0.1;
CHAT_FONT_HEIGHTS = {
[1] = 8,
[2] = 9,
[3] = 10,
[4] = 11,
[5] = 12,
[6] = 13,
[7] = 14,
[8] = 15,
[9] = 16,
[10] = 17,
[11] = 18,
[12] = 19,
[13] = 20,
}
CHAT_FLAG_AFK = '[AFK] '
CHAT_FLAG_DND = '[DND] '
CHAT_FLAG_GM = '[GM] '
CHAT_SAY_GET = '%s:\32'
CHAT_YELL_GET = '%s:\32'
CHAT_WHISPER_GET = 'from %s:\32'
CHAT_WHISPER_INFORM_GET = 'to %s:\32'
CHAT_GUILD_GET = '|Hchannel:Guild|hG|h %s:\32'
CHAT_OFFICER_GET = '|Hchannel:o|hO|h %s:\32'
CHAT_PARTY_GET = 'P %s:\32'
CHAT_MONSTER_PARTY_GET = '|Hchannel:raid|hR|h %s:\32'
CHAT_RAID_GET = '|Hchannel:raid|hR|h %s:\32'
CHAT_RAID_WARNING_GET = 'RW! %s:\32'
CHAT_RAID_LEADER_GET = '|Hchannel:raid|hL|h %s:\32'
CHAT_BATTLEGROUND_GET = '|Hchannel:Battleground|hBG|h %s:\32'
CHAT_BATTLEGROUND_LEADER_GET = '|Hchannel:Battleground|hBL|h %s:\32'
CHAT_YOU_CHANGED_NOTICE = '# |Hchannel:%d|h%s|h'
CHAT_YOU_JOINED_NOTICE = '+ |Hchannel:%d|h%s|h'
CHAT_YOU_LEFT_NOTICE = '- |Hchannel:%d|h%s|h'
ChatTypeInfo['CHANNEL'].sticky = 1
ChatTypeInfo['GUILD'].sticky = 1
ChatTypeInfo['OFFICER'].sticky = 1
ChatTypeInfo['PARTY'].sticky = 1
ChatTypeInfo['RAID'].sticky = 1
ChatTypeInfo['BATTLEGROUND'].sticky = 1
ChatTypeInfo['BATTLEGROUND_LEADER'].sticky = 1
local AddMessage = ChatFrame1.AddMessage
function FCF_AddMessage(self, text, ...)
if (type(text) == 'string') then
-- bnet names
text = text:gsub('(|HBNplayer.-|h)%[(.-)%]|h', '%1%2|h')
text = text:gsub('(|Hplayer.-|h)%[(.-)%]|h', '%1%2|h')
text = text:gsub('%[(%d+)%. (.+)%].+(|Hplayer.+)', '|Hchannel:channel|h%1|h %3')
-- text = format('%s %s', date'%H:%M', text)
end
return AddMessage(self, text, ...)
end
-- modify the editbox
for i = 1, NUM_CHAT_WINDOWS do
_G['ChatFrame'..i..'EditBox']:SetAltArrowKeyMode(false)
_G['ChatFrame'..i..'EditBox']:ClearAllPoints()
_G['ChatFrame'..i..'EditBox']:SetFont('interface\\addons\\media\\pixel 1.ttf', 10, 'outlinemonochrome')
_G['ChatFrame'..i..'EditBox']:SetPoint('BOTTOMLEFT', ChatFrame1, 'TOPLEFT', 2, 30)
_G['ChatFrame'..i..'EditBox']:SetPoint('BOTTOMRIGHT', ChatFrame1, 'TOPRIGHT', 0, 30)
_G['ChatFrame'..i..'EditBox']:SetBackdrop({
bgFile = 'Interface\\Buttons\\WHITE8x8',
insets = {
left = 3,
right = 3,
top = 2,
bottom = 2
},
})
_G['ChatFrame'..i..'EditBox']:SetBackdropColor(0, 0, 0, 0)
for k = 6, 11 do
select(k, _G['ChatFrame'..i..'EditBox']:GetRegions()):SetTexture(nil)
end
end
-- hide the menu and friend button
FriendsMicroButton:SetAlpha(0)
FriendsMicroButton:EnableMouse(false)
FriendsMicroButton:UnregisterAllEvents()
ChatFrameMenuButton:SetAlpha(0)
ChatFrameMenuButton:EnableMouse(false)
-- modify the chat
for i = 1, NUM_CHAT_WINDOWS do
local chat = _G['ChatFrame'..i]
chat:SetFont('interface\\addons\\media\\pixel 1.ttf', 8, 'outlinemonochrome')
chat:SetShadowOffset(0, 0)
chat:SetClampedToScreen(false)
chat:SetClampRectInsets(0, 0, 0, 0)
chat:SetMaxResize(UIParent:GetWidth(), UIParent:GetHeight())
chat:SetMinResize(150, 25)
-- enable mousewheel scrolling with all chat frames
chat:EnableMouseWheel(true)
chat:SetScript('OnMouseWheel', function(self, direction)
if (direction > 0) then
if (IsShiftKeyDown()) then
self:ScrollToTop()
else
self:ScrollUp()
end
elseif (direction < 0) then
if (IsShiftKeyDown()) then
self:ScrollToBottom()
else
self:ScrollDown()
end
end
end)
if (i ~= 2) then
chat.AddMessage = FCF_AddMessage
end
local buttonUp = _G['ChatFrame'..i..'ButtonFrameUpButton']
buttonUp:SetAlpha(0)
buttonUp:EnableMouse(false)
local buttonDown = _G['ChatFrame'..i..'ButtonFrameDownButton']
buttonDown:SetAlpha(0)
buttonDown:EnableMouse(false)
local buttonBottom = _G['ChatFrame'..i..'ButtonFrameBottomButton']
buttonBottom:SetAlpha(0)
buttonBottom:EnableMouse(false)
local tabLeft = _G['ChatFrame'..i..'TabLeft']
tabLeft:SetTexture(nil)
local tabMiddle = _G['ChatFrame'..i..'TabMiddle']
tabMiddle:SetTexture(nil)
local tabRight = _G['ChatFrame'..i..'TabRight']
tabRight:SetTexture(nil)
local tabText = _G['ChatFrame'..i..'TabText']
tabText:SetFont('interface\\addons\\media\\pixel.ttf', 16, 'outlinemonochrome')
tabText:SetShadowOffset(0, 0) -- (1, -1)
tabText:SetJustifyH('CENTER')
tabText:SetWidth(60)
local a1, a2, a3, a4, a5 = tabText:GetPoint()
tabText:SetPoint(a1, a2, a3, a4, a5 + 7)
local tabSelLeft = _G['ChatFrame'..i..'TabSelectedLeft']
tabSelLeft:SetTexture(nil)
local tabSelMiddle = _G['ChatFrame'..i..'TabSelectedMiddle']
tabSelMiddle:SetTexture(nil)
local tabSelRight = _G['ChatFrame'..i..'TabSelectedRight']
tabSelRight:SetTexture(nil)
local tabHigLeft = _G['ChatFrame'..i..'TabHighlightLeft']
tabHigLeft:SetTexture(nil)
local tabHigMiddle = _G['ChatFrame'..i..'TabHighlightMiddle']
tabHigMiddle:SetTexture(nil)
local tabHigRight = _G['ChatFrame'..i..'TabHighlightRight']
tabHigRight:SetTexture(nil)
local tabGlow = _G['ChatFrame'..i..'TabGlow']
tabGlow:SetTexture(nil)
tabGlow.Show = function()
tabText:SetTextColor(1, 0, 1, CHAT_FRAME_TAB_SELECTED_NOMOUSE_ALPHA == 0 and 0.5 or CHAT_FRAME_TAB_SELECTED_NOMOUSE_ALPHA)
end
tabGlow.Hide = function()
tabText:SetTextColor(1, 1, 1)
end
local tab = _G['ChatFrame'..i..'Tab']
tab:SetScript('OnEnter', function()
local al = tabText:GetAlpha()
tabText:SetTextColor(1, 0, 1, al)
end)
tab:SetScript('OnLeave', function()
local r, g, b
local hasNofication = tabGlow:IsShown()
if (_G['ChatFrame'..i] == SELECTED_CHAT_FRAME) then
r, g, b = 0, 0.75, 1
elseif (hasNofication) then
r, g, b = 1, 0, 1
else
r, g, b = 1, 1, 1
end
tabText:SetTextColor(r, g, b)
end)
-- hide some textures
for _, texture in pairs({
'ButtonFrameBackground',
'ButtonFrameTopLeftTexture',
'ButtonFrameBottomLeftTexture',
'ButtonFrameTopRightTexture',
'ButtonFrameBottomRightTexture',
'ButtonFrameLeftTexture',
'ButtonFrameRightTexture',
'ButtonFrameBottomTexture',
'ButtonFrameTopTexture',
}) do
_G['ChatFrame'..i..texture]:SetTexture(nil)
end
end
-- tab text colors for the tabs
hooksecurefunc('FCFTab_UpdateColors', function(self, selected)
if (selected) then
self:GetFontString():SetTextColor(0, 0.75, 1)
else
self:GetFontString():SetTextColor(1, 1, 1)
end
end)
-- new position for the minimize button (only chat frame 2 - 10)
for i = 2, NUM_CHAT_WINDOWS do
local chat = _G['ChatFrame'..i]
local chatMinimize = _G['ChatFrame'..i..'ButtonFrameMinimizeButton']
chatMinimize:ClearAllPoints()
chatMinimize:SetPoint('TOPRIGHT', chat, 'TOPLEFT', -2, 0)
end
-- modify the gm chatframe
local f = CreateFrame('Frame')
f:RegisterEvent('ADDON_LOADED')
f:SetScript('OnEvent', function(_, event)
if (event == 'ADDON_LOADED' and arg1 == 'Blizzard_GMChatUI') then
GMChatFrame:EnableMouseWheel(true)
GMChatFrame:SetScript('OnMouseWheel', ChatFrame1:GetScript('OnMouseWheel'))
GMChatFrame:SetHeight(200)
GMChatFrameUpButton:SetAlpha(0)
GMChatFrameUpButton:EnableMouse(false)
GMChatFrameDownButton:SetAlpha(0)
GMChatFrameDownButton:EnableMouse(false)
GMChatFrameBottomButton:SetAlpha(0)
GMChatFrameBottomButton:EnableMouse(false)
end
end)