FloatingChatFrame.xml

FloatingChatFrame.xml (9.0.2.37176; unchanged since 9.0.1.36230)
  1. <Ui xmlns="http://www.blizzard.com/wow/ui/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.blizzard.com/wow/ui/
  2. ..\FrameXML\UI.xsd">
  3.   <Script file="FloatingChatFrame.lua"/>
  4.   <Script file="ChannelFrameButtonMixin.lua"/>
  5.   <Script file="ChatAlertFrameMixin.lua"/>
  6.   <Frame name="FloatingBorderedFrame" virtual="true">
  7.     <Layers>
  8.       <Layer level="BACKGROUND">
  9.         <Texture name="$parentBackground" parentKey="Background" file="Interface\ChatFrame\ChatFrameBackground">
  10.           <Anchors>
  11.             <Anchor point="TOPLEFT" x="-2" y="3"/>
  12.             <Anchor point="TOPRIGHT" x="2" y="3"/>
  13.             <Anchor point="BOTTOMLEFT" x="-2" y="-6"/>
  14.             <Anchor point="BOTTOMRIGHT" x="3" y="-6"/>
  15.           </Anchors>
  16.         </Texture>
  17.       </Layer>
  18.       <Layer level="BORDER">
  19.         <Texture name="$parentTopLeftTexture" file="Interface\ChatFrame\UI-ChatFrame-BorderCorner">
  20.           <Size x="8" y="8"/>
  21.           <Anchors>
  22.             <Anchor point="TOPLEFT" relativeTo="$parentBackground" x="-4" y="4"/>
  23.           </Anchors>
  24.         </Texture>
  25.         <Texture name="$parentBottomLeftTexture" file="Interface\ChatFrame\UI-ChatFrame-BorderCorner">
  26.           <Size x="8" y="8"/>
  27.           <Anchors>
  28.             <Anchor point="BOTTOMLEFT" relativeTo="$parentBackground" x="-4" y="-4"/>
  29.           </Anchors>
  30.           <TexCoords left="0.0" right="1.0" top="1.0" bottom="0.0"/>
  31.         </Texture>
  32.         <Texture name="$parentTopRightTexture" file="Interface\ChatFrame\UI-ChatFrame-BorderCorner">
  33.           <Size x="8" y="8"/>
  34.           <Anchors>
  35.             <Anchor point="TOPRIGHT" relativeTo="$parentBackground" x="4" y="4"/>
  36.           </Anchors>
  37.           <TexCoords left="1.0" right="0.0" top="0.0" bottom="1.0"/>
  38.         </Texture>
  39.         <Texture name="$parentBottomRightTexture" file="Interface\ChatFrame\UI-ChatFrame-BorderCorner">
  40.           <Size x="8" y="8"/>
  41.           <Anchors>
  42.             <Anchor point="BOTTOMRIGHT" relativeTo="$parentBackground" x="4" y="-4"/>
  43.           </Anchors>
  44.           <TexCoords left="1.0" right="0.0" top="1.0" bottom="0.0"/>
  45.         </Texture>
  46.         <Texture name="$parentLeftTexture" file="Interface\ChatFrame\UI-ChatFrame-BorderLeft" vertTile="true">
  47.           <Size x="16" y="0"/>
  48.           <Anchors>
  49.             <Anchor point="TOPLEFT" relativeTo="$parentTopLeftTexture" relativePoint="BOTTOMLEFT"/>
  50.             <Anchor point="BOTTOMLEFT" relativeTo="$parentBottomLeftTexture" relativePoint="TOPLEFT"/>
  51.           </Anchors>
  52.         </Texture>
  53.         <Texture name="$parentRightTexture" file="Interface\ChatFrame\UI-ChatFrame-BorderLeft" vertTile="true">
  54.           <Size x="16" y="0"/>
  55.           <Anchors>
  56.             <Anchor point="TOPRIGHT" relativeTo="$parentTopRightTexture" relativePoint="BOTTOMRIGHT"/>
  57.             <Anchor point="BOTTOMRIGHT" relativeTo="$parentBottomRightTexture" relativePoint="TOPRIGHT"/>
  58.           </Anchors>
  59.           <TexCoords left="1.0" right="0.0" top="0.0" bottom="1.0"/>
  60.         </Texture>
  61.         <Texture name="$parentBottomTexture" file="Interface\ChatFrame\UI-ChatFrame-BorderTop" horizTile="true">
  62.           <Size x="0" y="16"/>
  63.           <Anchors>
  64.             <Anchor point="BOTTOMLEFT" relativeTo="$parentBottomLeftTexture" relativePoint="BOTTOMRIGHT"/>
  65.             <Anchor point="BOTTOMRIGHT" relativeTo="$parentBottomRightTexture" relativePoint="BOTTOMLEFT"/>
  66.           </Anchors>
  67.           <TexCoords left="0.0" right="1.0" top="1.0" bottom="0.0"/>
  68.         </Texture>
  69.         <Texture name="$parentTopTexture" file="Interface\ChatFrame\UI-ChatFrame-BorderTop" horizTile="true">
  70.           <Size x="0" y="16"/>
  71.           <Anchors>
  72.             <Anchor point="TOPLEFT" relativeTo="$parentTopLeftTexture" relativePoint="TOPRIGHT"/>
  73.             <Anchor point="TOPRIGHT" relativeTo="$parentTopRightTexture" relativePoint="TOPLEFT"/>
  74.           </Anchors>
  75.         </Texture>
  76.       </Layer>
  77.     </Layers>
  78.   </Frame>
  79.   <Button name="DockManagerOverflowListButtonTemplate" virtual="true">
  80.     <Size x="150" y="12"/>
  81.     <Layers>
  82.       <Layer level="BACKGROUND">
  83.         <Texture name="$parentHighlight" file="Interface\QuestFrame\UI-QuestTitleHighlight" parentKey="highlight" alphaMode="ADD" setAllPoints="true" hidden="true"/>
  84.       </Layer>
  85.       <Layer level="BORDER">
  86.         <Texture name="$parentGlow" file="Interface\ChatFrame\ChatFrameTab-NewMessage" parentKey="glow" alphaMode="ADD" hidden="true">
  87.           <Anchors>
  88.             <Anchor point="BOTTOMLEFT" x="8" y="-2"/>
  89.             <Anchor point="BOTTOMRIGHT" x="-8" y="-2"/>
  90.           </Anchors>
  91.         </Texture>
  92.       </Layer>
  93.       <Layer level="ARTWORK">
  94.         <Texture name="$parentConversationIcon" file="Interface\ChatFrame\UI-ChatConversationIcon" parentKey="conversationIcon">
  95.           <Size x="16" y="16"/>
  96.           <Anchors>
  97.             <Anchor point="LEFT" x="2" y="-1"/>
  98.           </Anchors>
  99.         </Texture>
  100.       </Layer>
  101.     </Layers>
  102.     <Scripts>
  103.       <OnEnter>
  104.         self.highlight:Show();
  105.       </OnEnter>
  106.       <OnLeave>
  107.         self.highlight:Hide();
  108.       </OnLeave>
  109.       <OnClick>
  110.         FCFDockOverflowListButton_OnClick(self, button)
  111.       </OnClick>
  112.     </Scripts>
  113.     <ButtonText>
  114.       <Anchors>
  115.         <Anchor point="LEFT" x="20" y="0"/>
  116.         <Anchor point="RIGHT" x="-20" y="0"/>
  117.       </Anchors>
  118.     </ButtonText>
  119.     <NormalFont style="GameFontNormalSmallLeft"/>
  120.   </Button>
  121.   <Frame name="DockManagerOverflowListTemplate" hidden="true" clampedToScreen="true" inherits="TooltipBackdropTemplate" virtual="true">
  122.     <Size x="160" y="12"/>
  123.     <Layers>
  124.       <Layer level="ARTWORK">
  125.         <FontString name="$parentNumTabs" inherits="GameFontDisable" parentKey="numTabs">
  126.           <Anchors>
  127.             <Anchor point="TOPLEFT" x="24" y="-5"/>
  128.           </Anchors>
  129.         </FontString>
  130.       </Layer>
  131.     </Layers>
  132.     <Scripts>
  133.       <OnLoad inherit="prepend">
  134.         self.buttons = {};
  135.       </OnLoad>
  136.     </Scripts>
  137.   </Frame>
  138.   <Frame name="DockManagerTemplate" frameStrata="LOW" virtual="true" parent="UIParent">
  139.     <Size x="0" y="26"/>
  140.     <Layers>
  141.       <Layer level="ARTWORK">
  142.         <Texture name="$parentInsertHighlight" file="Interface\ChatFrame\UI-ChatFrame-DockHighlight" alphaMode="ADD" parentKey="insertHighlight">
  143.           <Size x="32" y="32"/>
  144.         </Texture>
  145.       </Layer>
  146.     </Layers>
  147.     <Frames>
  148.       <Button name="$parentOverflowButton" parentKey="overflowButton" alpha="0.6">
  149.         <Size x="16" y="16"/>
  150.         <Anchors>
  151.           <Anchor point="BOTTOMRIGHT" x="0" y="-5"/>
  152.         </Anchors>
  153.         <Frames>
  154.           <Frame name="$parentList" inherits="DockManagerOverflowListTemplate" parentKey="list">
  155.             <Anchors>
  156.               <Anchor point="LEFT" relativePoint="RIGHT"/>
  157.             </Anchors>
  158.           </Frame>
  159.         </Frames>
  160.         <Scripts>
  161.           <OnLoad>
  162.             self.width = self:GetWidth();
  163.             self:RegisterEvent("UPDATE_CHAT_COLOR");
  164.           </OnLoad>
  165.           <OnEvent>
  166.             FCFDockOverflowButton_OnEvent(self, event, ...);
  167.           </OnEvent>
  168.           <OnClick>
  169.             FCFDockOverflowButton_OnClick(self, button);
  170.           </OnClick>
  171.         </Scripts>
  172.         <NormalTexture file="Interface\ChatFrame\chat-tab-arrow"/>
  173.         <HighlightTexture file="Interface\ChatFrame\chat-tab-arrow-on" alphaMode="ADD"/>
  174.       </Button>
  175.       <ScrollFrame name="$parentScrollFrame" parentKey="scrollFrame">
  176.         <Size x="0" y="31"/>
  177.         <Anchors>
  178.           <Anchor point="BOTTOMRIGHT" x="0" y="-5"/>
  179.         </Anchors>
  180.         <ScrollChild>
  181.           <Frame name="$parentChild" parentKey="child">
  182.             <Size x="1" y="26"/>
  183.             <Anchors>
  184.               <Anchor point="LEFT"/>
  185.             </Anchors>
  186.           </Frame>
  187.           <!--Frames will be dynamically added to the ScrollChild for now-->
  188.         </ScrollChild>
  189.       </ScrollFrame>
  190.     </Frames>
  191.     <Scripts>
  192.       <OnLoad function="FCFDock_OnLoad"/>
  193.       <OnEvent>
  194.         FCFDock_OnEvent(self, event, ...);
  195.       </OnEvent>
  196.     </Scripts>
  197.   </Frame>
  198.  
  199.   <!-- Tab Template-->
  200.   <Texture name="ChatTabConversationIconTemplate" file="Interface\ChatFrame\UI-ChatConversationIcon" virtual="true">
  201.     <Size x="16" y="16"/>
  202.   </Texture>
  203.   <Button name="ChatTabArtTemplate" virtual="true" alpha="0.4">
  204.     <Size x="64" y="32"/>
  205.     <Layers>
  206.       <Layer level="BACKGROUND">
  207.         <Texture name="$parentLeft" file="Interface\ChatFrame\ChatFrameTab-BGLeft" parentKey="leftTexture">
  208.           <Size x="16" y="32"/>
  209.           <Anchors>
  210.             <Anchor point="TOPLEFT"/>
  211.           </Anchors>
  212.         </Texture>
  213.         <Texture name="$parentMiddle" file="Interface\ChatFrame\ChatFrameTab-BGMid" horizTile="true" parentKey="middleTexture">
  214.           <Size x="44" y="32"/>
  215.           <Anchors>
  216.             <Anchor point="LEFT" relativeKey="$parent.leftTexture" relativePoint="RIGHT"/>
  217.           </Anchors>
  218.         </Texture>
  219.         <Texture name="$parentRight" file="Interface\ChatFrame\ChatFrameTab-BGRight" parentKey="rightTexture">
  220.           <Size x="16" y="32"/>
  221.           <Anchors>
  222.             <Anchor point="LEFT" relativeKey="$parent.middleTexture" relativePoint="RIGHT"/>
  223.           </Anchors>
  224.         </Texture>
  225.       </Layer>
  226.       <Layer level="BORDER">
  227.         <Texture name="$parentSelectedLeft" file="Interface\ChatFrame\ChatFrameTab-SelectedLeft" alphaMode="ADD" parentKey="leftSelectedTexture">
  228.           <Size x="16" y="32"/>
  229.           <Anchors>
  230.             <Anchor point="TOPLEFT" relativeKey="$parent.leftTexture" relativePoint="TOPLEFT"/>
  231.             <Anchor point="BOTTOMRIGHT" relativeKey="$parent.leftTexture" relativePoint="BOTTOMRIGHT"/>
  232.           </Anchors>
  233.         </Texture>
  234.         <Texture name="$parentSelectedMiddle" file="Interface\ChatFrame\ChatFrameTab-SelectedMid" horizTile="true" alphaMode="ADD" parentKey="middleSelectedTexture">
  235.           <Size x="44" y="32"/>
  236.           <Anchors>
  237.             <Anchor point="TOPLEFT" relativeKey="$parent.middleTexture" relativePoint="TOPLEFT"/>
  238.             <Anchor point="BOTTOMRIGHT" relativeKey="$parent.middleTexture" relativePoint="BOTTOMRIGHT"/>
  239.           </Anchors>
  240.         </Texture>
  241.         <Texture name="$parentSelectedRight" file="Interface\ChatFrame\ChatFrameTab-SelectedRight" alphaMode="ADD" parentKey="rightSelectedTexture">
  242.           <Size x="16" y="32"/>
  243.           <Anchors>
  244.             <Anchor point="TOPLEFT" relativeKey="$parent.rightTexture" relativePoint="TOPLEFT"/>
  245.             <Anchor point="BOTTOMRIGHT" relativeKey="$parent.rightTexture" relativePoint="BOTTOMRIGHT"/>
  246.           </Anchors>
  247.         </Texture>
  248.         <Texture name="$parentGlow" file="Interface\ChatFrame\ChatFrameTab-NewMessage" parentKey="glow" alphaMode="ADD" hidden="true">
  249.           <Anchors>
  250.             <Anchor point="BOTTOMLEFT" x="8"/>
  251.             <Anchor point="BOTTOMRIGHT" x="-8"/>
  252.           </Anchors>
  253.         </Texture>
  254.       </Layer>
  255.       <Layer level="HIGHLIGHT">
  256.         <Texture name="$parentHighlightLeft" file="Interface\ChatFrame\ChatFrameTab-HighlightLeft" alphaMode="ADD" parentKey="leftHighlightTexture">
  257.           <Size x="16" y="32"/>
  258.           <Anchors>
  259.             <Anchor point="TOPLEFT" relativeKey="$parent.leftTexture" relativePoint="TOPLEFT"/>
  260.             <Anchor point="BOTTOMRIGHT" relativeKey="$parent.leftTexture" relativePoint="BOTTOMRIGHT"/>
  261.           </Anchors>
  262.         </Texture>
  263.         <Texture name="$parentHighlightMiddle" file="Interface\ChatFrame\ChatFrameTab-HighlightMid" horizTile="true" alphaMode="ADD" parentKey="middleHighlightTexture">
  264.           <Size x="44" y="32"/>
  265.           <Anchors>
  266.             <Anchor point="TOPLEFT" relativeKey="$parent.middleTexture" relativePoint="TOPLEFT"/>
  267.             <Anchor point="BOTTOMRIGHT" relativeKey="$parent.middleTexture" relativePoint="BOTTOMRIGHT"/>
  268.           </Anchors>
  269.         </Texture>
  270.         <Texture name="$parentHighlightRight" file="Interface\ChatFrame\ChatFrameTab-HighlightRight" alphaMode="ADD" parentKey="rightHighlightTexture">
  271.           <Size x="16" y="32"/>
  272.           <Anchors>
  273.             <Anchor point="TOPLEFT" relativeKey="$parent.rightTexture" relativePoint="TOPLEFT"/>
  274.             <Anchor point="BOTTOMRIGHT" relativeKey="$parent.rightTexture" relativePoint="BOTTOMRIGHT"/>
  275.           </Anchors>
  276.         </Texture>
  277.       </Layer>
  278.     </Layers>
  279.   </Button>
  280.   <Button name="ChatTabTemplate" frameStrata="LOW" parent="UIParent" virtual="true" inherits="ChatTabArtTemplate">
  281.     <Anchors>
  282.       <Anchor point="BOTTOMLEFT" x="0" y="2"/>
  283.     </Anchors>
  284.     <Frames>
  285.       <Frame name="$parentFlash" hidden="true">
  286.         <Size x="5" y="32"/>
  287.         <Anchors>
  288.           <Anchor point="LEFT" relativeTo="$parentLeft" x="0" y="-7"/>
  289.           <Anchor point="RIGHT" relativeTo="$parentRight" x="0" y="-7"/>
  290.         </Anchors>
  291.         <Layers>
  292.           <Layer level="BACKGROUND">
  293.             <Texture file="Interface\PaperDollInfoFrame\UI-Character-Tab-Highlight" alphaMode="ADD" setAllPoints="true"/>
  294.           </Layer>
  295.         </Layers>
  296.       </Frame>
  297.       <Frame name="$parentDropDown" inherits="UIDropDownMenuTemplate" hidden="true">
  298.         <Anchors>
  299.           <Anchor point="TOP" x="-80" y="-35"/>
  300.         </Anchors>
  301.         <Scripts>
  302.           <OnLoad function="FCFOptionsDropDown_OnLoad"/>
  303.           <OnShow function="FCFOptionsDropDown_OnLoad"/>
  304.         </Scripts>
  305.       </Frame>
  306.     </Frames>
  307.     <Scripts>
  308.       <OnLoad>
  309.         self:RegisterForClicks("LeftButtonUp", "RightButtonUp", "MiddleButtonUp");
  310.         self:RegisterForDrag("LeftButton");
  311.       </OnLoad>
  312.       <OnClick>
  313.         FCF_Tab_OnClick(self, button);
  314.         PlaySound(SOUNDKIT.U_CHAT_SCROLL_BUTTON);
  315.       </OnClick>
  316.       <OnDoubleClick>
  317.         if ( button ~= "RightButton" ) then
  318.           local chatFrame = _G["ChatFrame"..self:GetID()];
  319.           if ( not chatFrame.isDocked ) then
  320.             FCF_MinimizeFrame(chatFrame, chatFrame.buttonSide);
  321.           end
  322.         end
  323.       </OnDoubleClick>
  324.       <OnDragStart>
  325.         local chatFrame = _G["ChatFrame"..self:GetID()];
  326.         if ( chatFrame == DEFAULT_CHAT_FRAME ) then
  327.           if (chatFrame.isLocked) then
  328.             return;
  329.           end
  330.           chatFrame:StartMoving();
  331.           MOVING_CHATFRAME = chatFrame;
  332.         elseif ( chatFrame.isDocked ) then
  333.           FCF_UnDockFrame(chatFrame);
  334.           FCF_SetLocked(chatFrame, false);
  335.           local chatTab = _G[chatFrame:GetName().."Tab"];
  336.           local x,y = chatTab:GetCenter();
  337.           x = x - (chatTab:GetWidth()/2);
  338.           y = y - (chatTab:GetHeight()/2);
  339.           chatTab:ClearAllPoints();
  340.           chatFrame:ClearAllPoints();
  341.           chatFrame:SetPoint("TOPLEFT", "UIParent", "BOTTOMLEFT", x, y);
  342.           FCF_SetTabPosition(chatFrame, 0);
  343.           chatFrame:StartMoving();
  344.           MOVING_CHATFRAME = chatFrame;
  345.           Blizzard_CombatLog_Update_QuickButtons();
  346.           SELECTED_CHAT_FRAME = chatFrame;
  347.         else
  348.           if ( chatFrame.isLocked ) then
  349.             return;
  350.           end
  351.           chatFrame:StartMoving();
  352.           SELECTED_CHAT_FRAME = chatFrame;
  353.           MOVING_CHATFRAME = chatFrame;
  354.         end
  355.  
  356.         self:LockHighlight();
  357.  
  358.         --OnUpdate simulates OnDragStop
  359.         --This is a hack fix we need to do because when SetParent is called, the OnDragStop never fires for the matching OnDragStart.
  360.         self.dragButton = button;
  361.         self:SetScript("OnUpdate", FCFTab_OnUpdate);
  362.       </OnDragStart>
  363.       <!--OnDragStop>
  364.         FCF_StopDragging(_G["ChatFrame"..self:GetID()]);
  365.       </OnDragStop-->
  366.     </Scripts>
  367.     <ButtonText name="$parentText" parentKey="Text">
  368.       <Size x="50" y="8"/>
  369.       <Anchors>
  370.         <Anchor point="LEFT" relativeTo="$parentLeft" relativePoint="RIGHT" x="0" y="-5"/>
  371.       </Anchors>
  372.     </ButtonText>
  373.     <NormalFont style="GameFontNormalSmall"/>
  374.   </Button>
  375.  
  376.   <!-- ===============================================================================-->
  377.   <!-- Floating frame template-->
  378.   <ScrollingMessageFrame name="FloatingChatFrameTemplate" movable="true" enableMouse="false" resizable="true" inherits="ChatFrameTemplate, FloatingBorderedFrame" parent="UIParent" hidden="true" clampedToScreen="true" dontSavePosition="true" frameLevel="5" virtual="true">
  379.     <Size x="430" y="120"/>
  380.     <Anchors>
  381.       <Anchor point="BOTTOMLEFT" x="100" y="100"/>
  382.     </Anchors>
  383.     <ResizeBounds>
  384.       <minResize>
  385.         <AbsDimension x="296" y="120"/>
  386.       </minResize>
  387.       <maxResize>
  388.         <AbsDimension x="608" y="400"/>
  389.       </maxResize>
  390.     </ResizeBounds>
  391.     <Frames>
  392.       <Button name="$parentClickAnywhereButton" setAllPoints="true" hidden="true" parentKey="clickAnywhereButton">
  393.         <Scripts>
  394.           <OnLoad>
  395.             FCFClickAnywhereButton_OnLoad(self);
  396.           </OnLoad>
  397.           <OnEvent>
  398.             FCFClickAnywhereButton_OnEvent(self, event, ...);
  399.           </OnEvent>
  400.           <OnClick>
  401.             ChatEdit_SetLastActiveWindow(self:GetParent().editBox);
  402.           </OnClick>
  403.         </Scripts>
  404.       </Button>
  405.       <Button name="$parentResizeButton" parentKey="ResizeButton">
  406.         <Size x="16" y="16"/>
  407.         <Anchors>
  408.           <Anchor point="BOTTOMRIGHT" relativeTo="$parentBackground" x="0" y="0"/>
  409.         </Anchors>
  410.         <Scripts>
  411.           <OnMouseDown>
  412.             local chatFrame = self:GetParent();
  413.             self:SetButtonState("PUSHED", true);
  414.             --SetCursor("UI-Cursor-Size");  --Hide the cursor
  415.  
  416.             self:GetHighlightTexture():Hide();
  417.  
  418.             if( self:GetParent().isDocked ) then
  419.               GENERAL_CHAT_DOCK.primary:StartSizing("BOTTOMRIGHT");
  420.             else
  421.               self:GetParent():StartSizing("BOTTOMRIGHT");
  422.             end
  423.  
  424.  
  425.           </OnMouseDown>
  426.           <OnMouseUp>
  427.             self:SetButtonState("NORMAL", false);
  428.             --SetCursor(nil); --Show the cursor again
  429.  
  430.             self:GetHighlightTexture():Show();
  431.  
  432.             if( self:GetParent().isDocked ) then
  433.               GENERAL_CHAT_DOCK.primary:StopMovingOrSizing();
  434.             else
  435.               self:GetParent():StopMovingOrSizing();
  436.             end
  437.             FCF_SavePositionAndDimensions(self:GetParent());
  438.           </OnMouseUp>
  439.         </Scripts>
  440.         <NormalTexture file="Interface\ChatFrame\UI-ChatIM-SizeGrabber-Up"/>
  441.         <HighlightTexture file="Interface\ChatFrame\UI-ChatIM-SizeGrabber-Highlight"/>
  442.         <PushedTexture file="Interface\ChatFrame\UI-ChatIM-SizeGrabber-Down"/>
  443.       </Button>
  444.       <Frame name="$parentButtonFrame" inherits="FloatingBorderedFrame" parentKey="buttonFrame" alpha="0.2">
  445.         <Size x="29" y="0"/>
  446.         <Frames>
  447.           <Button name="$parentMinimizeButton" parentKey="minimizeButton">
  448.             <Size x="32" y="32"/>
  449.             <Anchors>
  450.               <Anchor point="TOP" x="0" y="4"/>
  451.             </Anchors>
  452.             <Scripts>
  453.               <OnClick>
  454.                 local chatFrame = self:GetParent():GetParent();
  455.                 FCF_MinimizeFrame(chatFrame, strupper(chatFrame.buttonSide));
  456.               </OnClick>
  457.             </Scripts>
  458.             <NormalTexture file="Interface\ChatFrame\UI-ChatIcon-Minimize-Up"/>
  459.             <PushedTexture file="Interface\ChatFrame\UI-ChatIcon-Minimize-Down"/>
  460.             <HighlightTexture file="Interface\Buttons\UI-Common-MouseHilight" alphaMode="ADD"/>
  461.           </Button>
  462.         </Frames>
  463.       </Frame>
  464.       <Button parentKey="ScrollToBottomButton" alpha="0">
  465.         <Size x="24" y="24"/>
  466.         <Anchors>
  467.           <Anchor point="BOTTOMRIGHT" relativeKey="$parent.ResizeButton" relativePoint="TOPRIGHT" x="0" y="-2"/>
  468.         </Anchors>
  469.         <Layers>
  470.           <Layer level="OVERLAY">
  471.             <Texture parentKey="Flash" file="Interface\ChatFrame\UI-ChatIcon-BlinkHilight" hidden="true"/>
  472.           </Layer>
  473.         </Layers>
  474.         <Scripts>
  475.           <OnClick>
  476.             PlaySound(SOUNDKIT.IG_CHAT_BOTTOM);
  477.             self:GetParent():ScrollToBottom();
  478.           </OnClick>
  479.         </Scripts>
  480.         <NormalTexture file="Interface\ChatFrame\UI-ChatIcon-ScrollEnd-Up"/>
  481.         <PushedTexture file="Interface\ChatFrame\UI-ChatIcon-ScrollEnd-Down"/>
  482.         <DisabledTexture file="Interface\ChatFrame\UI-ChatIcon-ScrollEnd-Disabled"/>
  483.         <HighlightTexture file="Interface\Buttons\UI-Common-MouseHilight" alphaMode="ADD"/>
  484.       </Button>
  485.       <Slider parentKey="ScrollBar" obeyStepOnDrag="true" valueStep="1" minValue="0" maxValue="1" alpha="0">
  486.         <Size x="22" y="0"/>
  487.         <ThumbTexture name="$parentThumbTexture" parentKey="ThumbTexture" atlas="chatframe-scrollbar-knob" useAtlasSize="true"/>
  488.         <Scripts>
  489.           <OnValueChanged>
  490.             if userInput then
  491.               local min, max = self:GetMinMaxValues();
  492.               self:GetParent():SetScrollOffset(max - value);
  493.             end
  494.           </OnValueChanged>
  495.         </Scripts>
  496.       </Slider>
  497.       <EditBox name="$parentEditBox" inherits="ChatFrameEditBoxTemplate" parentKey="editBox">
  498.         <Size x="5" y="32"/>
  499.         <Anchors>
  500.           <Anchor point="TOPLEFT" relativeTo="$parent" relativePoint="BOTTOMLEFT" x="-5" y="-2"/>
  501.           <Anchor point="RIGHT" relativeKey="$parent.ScrollBar" relativePoint="RIGHT" x="5" y="0"/>
  502.         </Anchors>
  503.         <Scripts>
  504.           <OnLoad>
  505.             self.chatFrame = self:GetParent();
  506.             ChatEdit_OnLoad(self);
  507.           </OnLoad>
  508.         </Scripts>
  509.       </EditBox>
  510.     </Frames>
  511.     <Scripts>
  512.       <OnLoad>
  513.         ChatFrame_OnLoad(self);
  514.         FloatingChatFrame_OnLoad(self);
  515.       </OnLoad>
  516.       <OnUpdate>
  517.         ChatFrame_OnUpdate(self, elapsed);
  518.       </OnUpdate>
  519.       <OnShow>
  520.         SetChatWindowShown(self:GetID(), true);
  521.         FCF_StopAlertFlash(self);
  522.       </OnShow>
  523.       <OnHide>
  524.         --If UIParent is hidden (Alt-Z), OnHide is called, but self:IsShown() is still true (self:IsVisible() would be false)
  525.         if ( not self:IsShown() ) then
  526.           if ( not self.minimized ) then
  527.             SetChatWindowShown(self:GetID(), false);
  528.           end
  529.         end
  530.       </OnHide>
  531.       <OnEvent>
  532.         ChatFrame_OnEvent(self, event, ...);
  533.         FloatingChatFrame_OnEvent(self, event, ...);
  534.       </OnEvent>
  535.     </Scripts>
  536.   </ScrollingMessageFrame>
  537.  
  538.   <Button name="FloatingChatFrameMinimizedTemplate" movable="true" clampedToScreen="true" virtual="true">
  539.     <Size x="180" y="32"/>
  540.     <Layers>
  541.       <Layer level="BACKGROUND">
  542.         <Texture name="$parentLeftTexture" file="Interface\ChatFrame\ChatFrameTab-BGLeft-min" parentKey="leftTexture">
  543.           <Size x="16" y="32"/>
  544.           <Anchors>
  545.             <Anchor point="LEFT"/>
  546.           </Anchors>
  547.         </Texture>
  548.         <Texture name="$parentRightTexture" file="Interface\ChatFrame\ChatFrameTab-BGRight-min" parentKey="rightTexture">
  549.           <Size x="16" y="32"/>
  550.           <Anchors>
  551.             <Anchor point="RIGHT"/>
  552.           </Anchors>
  553.         </Texture>
  554.         <Texture name="$parentMiddleTexture" file="Interface\ChatFrame\ChatFrameTab-BGMid-min" horizTile="true" parentKey="middleTexture">
  555.           <Size x="0" y="32"/>
  556.           <Anchors>
  557.             <Anchor point="TOPLEFT" relativeTo="$parentLeftTexture" relativePoint="TOPRIGHT"/>
  558.             <Anchor point="BOTTOMRIGHT" relativeTo="$parentRightTexture" relativePoint="BOTTOMLEFT"/>
  559.           </Anchors>
  560.         </Texture>
  561.       </Layer>
  562.       <Layer level="BORDER">
  563.         <Texture name="$parentGlow" file="Interface\ChatFrame\ChatFrameTab-NewMessage" parentKey="glow" alphaMode="ADD" hidden="true">
  564.           <Anchors>
  565.             <Anchor point="BOTTOMLEFT" x="8" y="7"/>
  566.             <Anchor point="BOTTOMRIGHT" x="-24" y="7"/>
  567.           </Anchors>
  568.         </Texture>
  569.       </Layer>
  570.       <Layer level="ARTWORK">
  571.         <Texture name="$parentConversationIcon" file="Interface\ChatFrame\UI-ChatConversationIcon" parentKey="conversationIcon">
  572.           <Size x="16" y="16"/>
  573.           <Anchors>
  574.             <Anchor point="LEFT" x="12" y="-1"/>
  575.           </Anchors>
  576.         </Texture>
  577.       </Layer>
  578.       <Layer level="HIGHLIGHT">
  579.         <Texture name="$parentLeftHighlightTexture" file="Interface\ChatFrame\ChatFrameTab-HighlightLeft-min" alphaMode="ADD" parentKey="leftHighlightTexture">
  580.           <Size x="16" y="32"/>
  581.           <Anchors>
  582.             <Anchor point="LEFT"/>
  583.           </Anchors>
  584.         </Texture>
  585.         <Texture name="$parentRightHighlightTexture" file="Interface\ChatFrame\ChatFrameTab-HighlightRight-min" alphaMode="ADD" parentKey="rightHighlightTexture">
  586.           <Size x="16" y="32"/>
  587.           <Anchors>
  588.             <Anchor point="RIGHT"/>
  589.           </Anchors>
  590.         </Texture>
  591.         <Texture name="$parentMiddleHighlightTexture" file="Interface\ChatFrame\ChatFrameTab-HighlightMid-min" horizTile="true" alphaMode="ADD" parentKey="middleHighlightTexture">
  592.           <Size x="0" y="32"/>
  593.           <Anchors>
  594.             <Anchor point="TOPLEFT" relativeTo="$parentLeftTexture" relativePoint="TOPRIGHT"/>
  595.             <Anchor point="BOTTOMRIGHT" relativeTo="$parentRightTexture" relativePoint="BOTTOMLEFT"/>
  596.           </Anchors>
  597.         </Texture>
  598.       </Layer>
  599.     </Layers>
  600.     <Frames>
  601.       <Button name="$parentMaximizeButton">
  602.         <Size x="25" y="25"/>
  603.         <Anchors>
  604.           <Anchor point="RIGHT" x="-3" y="0"/>
  605.         </Anchors>
  606.         <Scripts>
  607.           <OnClick>
  608.             FCF_MaximizeFrame(self:GetParent().maxFrame);
  609.           </OnClick>
  610.         </Scripts>
  611.         <NormalTexture file="Interface\ChatFrame\UI-ChatIcon-Maximize-Up"/>
  612.         <PushedTexture file="Interface\ChatFrame\UI-ChatIcon-Maximize-Down"/>
  613.         <HighlightTexture file="Interface\Buttons\UI-Common-MouseHilight" alphaMode="ADD"/>
  614.       </Button>
  615.     </Frames>
  616.     <Scripts>
  617.       <OnLoad>
  618.         self:RegisterForDrag("LeftButton");
  619.         self:SetClampRectInsets(0, 0, 0, -50);
  620.         self.Text:ClearAllPoints();
  621.         self.Text:SetPoint("LEFT", self, "LEFT", 15, 0);
  622.         self.Text:SetPoint("RIGHT", self, "RIGHT", -25, 0);
  623.       </OnLoad>
  624.       <OnDragStart>
  625.         self:StartMoving();
  626.       </OnDragStart>
  627.       <OnDragStop>
  628.         self:StopMovingOrSizing();
  629.         self:SetUserPlaced(false);  --So that we don't save the position
  630.       </OnDragStop>
  631.       <OnDoubleClick>
  632.         FCF_MaximizeFrame(self.maxFrame);
  633.       </OnDoubleClick>
  634.     </Scripts>
  635.     <ButtonText name="$parentText" parentKey="Text">
  636.       <Size x="0" y="8"/>
  637.     </ButtonText>
  638.     <NormalFont style="GameFontNormalSmall"/>
  639.   </Button>
  640.  
  641.   <!-- Main dock manager -->
  642.   <Frame name="GeneralDockManager" inherits="DockManagerTemplate">
  643.     <Scripts>
  644.       <OnLoad>
  645.         FCFDock_OnLoad(self);
  646.         GENERAL_CHAT_DOCK = self;
  647.         -- resize for locales
  648.         local list = self.overflowButton.list;
  649.         list.numTabs:SetFormattedText(CHAT_WINDOWS_COUNT, 10);
  650.         list:SetWidth(list.numTabs:GetWidth() + 48);  -- 24 pixel margins
  651.       </OnLoad>
  652.     </Scripts>
  653.   </Frame>
  654.  
  655.   <!-- Main chat window -->
  656.   <Button name="ChatFrame1Tab" inherits="ChatTabTemplate" id="1"/>
  657.   <ScrollingMessageFrame name="ChatFrame1" hidden="false" inherits="FloatingChatFrameTemplate" id="1">
  658.     <Size x="430" y="120"/>
  659.     <Anchors>
  660.       <Anchor point="BOTTOMLEFT" x="32" y="95"/>
  661.     </Anchors>
  662.     <Scripts>
  663.       <OnLoad>
  664.         tinsert(CHAT_FRAMES, self:GetName());
  665.         ChatFrame_OnLoad(self);
  666.         DEFAULT_CHAT_FRAME = ChatFrame1;
  667.         SELECTED_CHAT_FRAME = ChatFrame1;
  668.         SELECTED_DOCK_FRAME = ChatFrame1;
  669.  
  670.         self.isStaticDocked = true;
  671.         FCFDock_SetPrimary(GENERAL_CHAT_DOCK, self);
  672.         ChatEdit_SetLastActiveWindow(self.editBox);
  673.  
  674.         self:RegisterEvent("UPDATE_CHAT_WINDOWS");
  675.         self:RegisterEvent("UPDATE_FLOATING_CHAT_WINDOWS");
  676.  
  677.         FloatingChatFrame_SetupScrolling(self);
  678.       </OnLoad>
  679.       <OnEvent>
  680.         ChatFrame_OnEvent(self, event, ...);
  681.         FloatingChatFrame_OnEvent(self, event, ...);
  682.       </OnEvent>
  683.     </Scripts>
  684.   </ScrollingMessageFrame>
  685.   <!-- ChatFrame1 Specific buttons -->
  686.   <Button name="ChatFrameMenuButton" frameStrata="LOW" parent="UIParent">
  687.     <Size x="32" y="32"/>
  688.     <Anchors>
  689.       <Anchor point="BOTTOM" relativeTo="ChatFrame1ButtonFrame" relativePoint="BOTTOM" x="0" y="0"/>
  690.     </Anchors>
  691.     <Scripts>
  692.       <OnClick>
  693.         PlaySound(SOUNDKIT.IG_CHAT_EMOTE_BUTTON);
  694.         ChatFrame_ToggleMenu();
  695.       </OnClick>
  696.     </Scripts>
  697.     <NormalTexture file="Interface\ChatFrame\UI-ChatIcon-Chat-Up"/>
  698.     <PushedTexture file="Interface\ChatFrame\UI-ChatIcon-Chat-Down"/>
  699.     <DisabledTexture file="Interface\ChatFrame\UI-ChatIcon-Chat-Disabled"/>
  700.     <HighlightTexture file="Interface\Buttons\UI-Common-MouseHilight" alphaMode="ADD"/>
  701.   </Button>
  702.   <Button name="ChatFrameChannelButton" frameStrata="LOW" parent="UIParent" mixin="ChannelFrameButtonMixin" inherits="VoiceToggleButtonTemplate">
  703.     <Anchors>
  704.       <Anchor point="TOP" relativeTo="ChatFrame1ButtonFrame" relativePoint="TOP" x="0" y="0"/>
  705.     </Anchors>
  706.     <Layers>
  707.       <Layer level="OVERLAY">
  708.         <Texture parentKey="Flash" atlas="chatframe-button-highlightalert" useAtlasSize="true" alphaMode="ADD" hidden="true">
  709.           <Anchors>
  710.             <Anchor point="CENTER" x="0" y="0"/>
  711.           </Anchors>
  712.         </Texture>
  713.       </Layer>
  714.     </Layers>
  715.   </Button>
  716.   <Button name="ChatFrameToggleVoiceDeafenButton" frameStrata="LOW" parent="UIParent" inherits="ToggleVoiceDeafenButtonTemplate">
  717.     <Anchors>
  718.       <Anchor point="TOP" relativeTo="ChatFrameChannelButton" relativePoint="BOTTOM" x="0" y="-2" />
  719.     </Anchors>
  720.   </Button>
  721.   <Button name="ChatFrameToggleVoiceMuteButton" frameStrata="LOW" parent="UIParent" inherits="ToggleVoiceMuteButtonTemplate">
  722.     <Anchors>
  723.       <Anchor point="TOP" relativeTo="ChatFrameToggleVoiceDeafenButton" relativePoint="BOTTOM" x="0" y="-2" />
  724.     </Anchors>
  725.   </Button>
  726.   <Frame name="ChatMenu" inherits="UIMenuTemplate" hidden="true" clampedToScreen="true" parent="UIParent">
  727.     <Anchors>
  728.       <Anchor point="BOTTOMLEFT" relativeTo="ChatFrameMenuButton" relativePoint="TOPRIGHT"/>
  729.     </Anchors>
  730.     <Scripts>
  731.       <OnLoad inherit="prepend" function="ChatMenu_OnLoad"/>
  732.       <OnShow function="ChatMenu_OnShow"/>
  733.     </Scripts>
  734.   </Frame>
  735.   <Frame name="EmoteMenu" inherits="UIMenuTemplate" hidden="true" clampedToScreen="true" parent="ChatMenu">
  736.     <Scripts>
  737.       <OnLoad inherit="prepend" function="EmoteMenu_OnLoad"/>
  738.     </Scripts>
  739.   </Frame>
  740.   <Frame name="LanguageMenu" inherits="UIMenuTemplate" hidden="true" clampedToScreen="true" parent="ChatMenu">
  741.     <Scripts>
  742.       <OnLoad inherit="prepend" function="LanguageMenu_OnLoad"/>
  743.       <OnEvent function="LanguageMenu_OnEvent"/>
  744.     </Scripts>
  745.   </Frame>
  746.   <Frame name="VoiceMacroMenu" inherits="UIMenuTemplate" hidden="true" clampedToScreen="true" parent="ChatMenu">
  747.     <Scripts>
  748.       <OnLoad inherit="prepend" function="VoiceMacroMenu_OnLoad"/>
  749.     </Scripts>
  750.   </Frame>
  751.   <Frame name="ChatAlertFrame" mixin="ChatAlertFrameMixin" inherits="AlertContainerTemplate">
  752.     <Size x="10" y="10"/>
  753.     <Anchors>
  754.       <Anchor point="BOTTOMLEFT" relativeTo="ChatFrame1ButtonFrame" relativePoint="TOPLEFT" x="-1" y="27"/>
  755.     </Anchors>
  756.     <Scripts>
  757.       <OnLoad method="OnLoad"/>
  758.     </Scripts>
  759.   </Frame>
  760.   <Button name="ChatFrame2Tab" inherits="ChatTabTemplate" id="2"/>
  761.   <ScrollingMessageFrame name="ChatFrame2" inherits="FloatingChatFrameTemplate" id="2">
  762.     <Scripts>
  763.       <OnLoad>
  764.         ChatFrame_OnLoad(self);
  765.         FloatingChatFrame_OnLoad(self);
  766.         self:SetClampRectInsets(-35, 35, 52, -50);
  767.         self.isStaticDocked = true;
  768.       </OnLoad>
  769.     </Scripts>
  770.   </ScrollingMessageFrame>
  771.   <Button name="ChatFrame3Tab" inherits="ChatTabTemplate" id="3"/>
  772.   <ScrollingMessageFrame name="ChatFrame3" inherits="FloatingChatFrameTemplate" id="3"/>
  773.   <Button name="ChatFrame4Tab" inherits="ChatTabTemplate" id="4"/>
  774.   <ScrollingMessageFrame name="ChatFrame4" inherits="FloatingChatFrameTemplate" id="4"/>
  775.   <Button name="ChatFrame5Tab" inherits="ChatTabTemplate" id="5"/>
  776.   <ScrollingMessageFrame name="ChatFrame5" inherits="FloatingChatFrameTemplate" id="5"/>
  777.   <Button name="ChatFrame6Tab" inherits="ChatTabTemplate" id="6"/>
  778.   <ScrollingMessageFrame name="ChatFrame6" inherits="FloatingChatFrameTemplate" id="6"/>
  779.   <Button name="ChatFrame7Tab" inherits="ChatTabTemplate" id="7"/>
  780.   <ScrollingMessageFrame name="ChatFrame7" inherits="FloatingChatFrameTemplate" id="7"/>
  781.   <Button name="ChatFrame8Tab" inherits="ChatTabTemplate" id="8"/>
  782.   <ScrollingMessageFrame name="ChatFrame8" inherits="FloatingChatFrameTemplate" id="8"/>
  783.   <Button name="ChatFrame9Tab" inherits="ChatTabTemplate" id="9"/>
  784.   <ScrollingMessageFrame name="ChatFrame9" inherits="FloatingChatFrameTemplate" id="9"/>
  785.   <Button name="ChatFrame10Tab" inherits="ChatTabTemplate" id="10"/>
  786.   <ScrollingMessageFrame name="ChatFrame10" inherits="FloatingChatFrameTemplate" id="10"/>
  787.  
  788.   <!--This frame is here to work as a single point of entry for events which must fire once and only once-->
  789.   <Frame name="FloatingChatFrameManager">
  790.     <Scripts>
  791.       <OnLoad function="FloatingChatFrameManager_OnLoad"/>
  792.       <OnEvent function="FloatingChatFrameManager_OnEvent"/>
  793.     </Scripts>
  794.   </Frame>
  795. </Ui>