self.highlight:Show();
self.highlight:Hide();
FCFDockOverflowListButton_OnClick(self, button)
self:SetBackdropColor(0.05, 0.05, 0.11); self.buttons = {};
self.width = self:GetWidth(); self:RegisterEvent("UPDATE_CHAT_COLOR");
FCFDockOverflowButton_OnEvent(self, event, ...);
GameTooltip_AddNewbieTip(self, CHAT_OVERFLOW_LABEL, 1.0, 1.0, 1.0, NEWBIE_TOOLTIP_CHAT_OVERFLOW, 1);
GameTooltip:Hide();
FCFDockOverflowButton_OnClick(self, button);
FCFDock_OnEvent(self, event, ...);
self:RegisterForClicks("LeftButtonUp", "RightButtonUp"); self:RegisterForDrag("LeftButton");
FCF_Tab_OnClick(self, button); PlaySound("UChatScrollButton");
if ( button ~= "RightButton" ) then local chatFrame = _G["ChatFrame"..self:GetID()]; if ( not chatFrame.isDocked ) then FCF_MinimizeFrame(chatFrame, chatFrame.buttonSide); end end
local chatFrame = _G["ChatFrame"..self:GetID()];

if ( chatFrame.isTemporary and chatFrame.chatType == "BN_CONVERSATION" ) then GameTooltip:SetOwner(self, "ANCHOR_TOPRIGHT"); BNConversation_DisplayConversationTooltip(tonumber(chatFrame.chatTarget)); else GameTooltip_AddNewbieTip(self, CHAT_OPTIONS_LABEL, 1.0, 1.0, 1.0, NEWBIE_TOOLTIP_CHATOPTIONS, 1); end
GameTooltip:Hide();
local chatFrame = _G["ChatFrame"..self:GetID()]; if ( chatFrame == DEFAULT_CHAT_FRAME ) then if (chatFrame.isLocked) then return; end chatFrame:StartMoving(); MOVING_CHATFRAME = chatFrame; elseif ( chatFrame.isDocked ) then FCF_UnDockFrame(chatFrame); FCF_SetLocked(chatFrame, nil); local chatTab = _G[chatFrame:GetName().."Tab"]; local x,y = chatTab:GetCenter(); x = x - (chatTab:GetWidth()/2); y = y - (chatTab:GetHeight()/2); chatTab:ClearAllPoints(); chatFrame:ClearAllPoints(); chatFrame:SetPoint("TOPLEFT", "UIParent", "BOTTOMLEFT", x, y); FCF_SetTabPosition(chatFrame, 0); chatFrame:StartMoving(); MOVING_CHATFRAME = chatFrame; Blizzard_CombatLog_Update_QuickButtons(); SELECTED_CHAT_FRAME = chatFrame; else if ( chatFrame.isLocked ) then return; end chatFrame:StartMoving(); SELECTED_CHAT_FRAME = chatFrame; MOVING_CHATFRAME = chatFrame; end

self:LockHighlight();

--OnUpdate simulates OnDragStop --This is a hack fix we need to do because when SetParent is called, the OnDragStop never fires for the matching OnDragStart. self.dragButton = button; self:SetScript("OnUpdate", FCFTab_OnUpdate);
FCFClickAnywhereButton_OnLoad(self);
FCFClickAnywhereButton_OnEvent(self, event, ...);
ChatEdit_SetLastActiveWindow(self:GetParent().editBox);
local chatFrame = self:GetParent(); self:SetButtonState("PUSHED", true); SetCursor("UI-Cursor-Size"); --Hide the cursor

self:GetHighlightTexture():Hide();

chatFrame:StartSizing("BOTTOMRIGHT");
self:SetButtonState("NORMAL", false); SetCursor(nil); --Show the cursor again

self:GetHighlightTexture():Show();

self:GetParent():StopMovingOrSizing(); FCF_SavePositionAndDimensions(self:GetParent());
PlaySound("igChatBottom"); self:GetParent():GetParent():ScrollToBottom();
MessageFrameScrollButton_OnLoad(self);
MessageFrameScrollButton_OnUpdate(self, elapsed);
if ( self:GetButtonState() == "PUSHED" ) then self.clickDelay = MESSAGE_SCROLLBUTTON_INITIAL_DELAY; else self:GetParent():GetParent():ScrollDown(); end PlaySound("igChatScrollDown");
MessageFrameScrollButton_OnLoad(self);
MessageFrameScrollButton_OnUpdate(self, elapsed);
if ( self:GetButtonState() == "PUSHED" ) then self.clickDelay = MESSAGE_SCROLLBUTTON_INITIAL_DELAY; else self:GetParent():GetParent():ScrollUp(); end PlaySound("igChatScrollUp");
local chatFrame = self:GetParent():GetParent(); FCF_MinimizeFrame(chatFrame, strupper(chatFrame.buttonSide));
self.chatFrame = self:GetParent(); ChatEdit_OnLoad(self);
ChatFrame_OnLoad(self); FloatingChatFrame_OnLoad(self);
ChatFrame_OnUpdate(self, elapsed);
local name = self:GetName(); _G[name.."ButtonFrameBottomButton"]:Show(); _G[name.."ButtonFrameDownButton"]:Show(); _G[name.."ButtonFrameUpButton"]:Show(); SetChatWindowShown(self:GetID(), 1); FCF_StopAlertFlash(self);
--If UIParent is hidden (Alt-Z), OnHide is called, but self:IsShown() is still true (self:IsVisible() would be false) if ( not self:IsShown() ) then local name = self:GetName(); _G[name.."ButtonFrameBottomButton"]:Hide(); _G[name.."ButtonFrameDownButton"]:Hide(); _G[name.."ButtonFrameUpButton"]:Hide(); if ( not self.minimized ) then SetChatWindowShown(self:GetID(), nil); end end
ChatFrame_OnEvent(self, event, ...); FloatingChatFrame_OnEvent(self, event, ...);
FCF_MaximizeFrame(self:GetParent().maxFrame);
self:RegisterForDrag("LeftButton"); self:SetClampRectInsets(0, 0, 0, -50); self.Text:ClearAllPoints(); self.Text:SetPoint("LEFT", self, "LEFT", 15, 0); self.Text:SetPoint("RIGHT", self, "RIGHT", -25, 0);
self:StartMoving();
self:StopMovingOrSizing(); self:SetUserPlaced(false); --So that we don't save the position
FCF_MaximizeFrame(self.maxFrame);
FCFDock_OnLoad(self); GENERAL_CHAT_DOCK = self; -- resize for locales local list = self.overflowButton.list; list.numTabs:SetFormattedText(CHAT_WINDOWS_COUNT, 10); list:SetWidth(list.numTabs:GetWidth() + 48); -- 24 pixel margins
tinsert(CHAT_FRAMES, self:GetName()); ChatFrame_OnLoad(self); DEFAULT_CHAT_FRAME = ChatFrame1; SELECTED_CHAT_FRAME = ChatFrame1; SELECTED_DOCK_FRAME = ChatFrame1;

self.isStaticDocked = true; FCFDock_SetPrimary(GENERAL_CHAT_DOCK, self); ChatEdit_SetLastActiveWindow(self.editBox);

self:SetClampRectInsets(-35, 35, 38, -50); self:RegisterEvent("UPDATE_CHAT_WINDOWS"); self:RegisterEvent("UPDATE_FLOATING_CHAT_WINDOWS");
ChatFrame_OnEvent(self, event, ...); FloatingChatFrame_OnEvent(self, event, ...);
PlaySound("igChatEmoteButton"); ChatFrame_OpenMenu();
GameTooltip_AddNewbieTip(self, CHAT_LABEL, 1.0, 1.0, 1.0, NEWBIE_TOOLTIP_CHATMENU, 1);
self:SetPoint("BOTTOM", DEFAULT_CHAT_FRAME.buttonFrame, "TOP", 0, 4); local _, numBNetOnline = BNGetNumFriends(); local _, numWoWOnline = GetNumFriends(); FriendsMicroButtonCount:SetText(numBNetOnline + numWoWOnline); FriendsMicroButtonCount:SetShadowOffset(1, 1);
ToggleFriendsFrame(1);
GameTooltip_AddNewbieTip(self, MicroButtonTooltipText(SOCIAL_BUTTON, "TOGGLESOCIAL"), 1.0, 1.0, 1.0, NEWBIE_TOOLTIP_SOCIAL);
GameTooltip:Hide();
ChatFrame_OnLoad(self); FloatingChatFrame_OnLoad(self); self.isStaticDocked = true;