Thread Tools Display Modes
06-29-10, 01:01 AM   #21
Kendian
A Molten Giant
 
Kendian's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2010
Posts: 614
Originally Posted by maurdr View Post
i looked in both edit box config areas and it didnt have any options for positioning that i saw.
Under edit box polish, middle right of config screen theres a clickable drop down, should read Free floating locked, or something to that effect, click the free floating option, position it, and relock it, or just pick top. Hope this helps~

Last edited by Kendian : 06-29-10 at 01:02 AM. Reason: Typo
  Reply With Quote
06-29-10, 07:35 AM   #22
Kagaro
A Cyclonian
AddOn Author - Click to view addons
Join Date: Sep 2006
Posts: 45
If your having Chatter issues, make a ticket im helping antiarc get them fixed as fast as possible. at this point I think i squashed 99.9% of the chatter bugs with 3.3.5.
  Reply With Quote
06-29-10, 08:53 PM   #23
harrellj
A Flamescale Wyrmkin
Join Date: Jul 2009
Posts: 132
In Chatter, the positioning should be in the edit box polish section and have a drop with choices like top, bottom, free-floating, and free-floating locked.

ETA: Bleh, or I need to pay attention that there's a page 2 before answering a question :P
  Reply With Quote
06-29-10, 10:34 PM   #24
Grimsin
A Molten Giant
 
Grimsin's Avatar
AddOn Author - Click to view addons
Join Date: Sep 2006
Posts: 990
i have a solution one moment while i attempt to make it fit your needs...

here

lua Code:
  1. local function AdjustChatButtonFrame(self)
  2.     for id = 1,8 do
  3.         if _G["ChatFrame"..id.."ButtonFrame"]:IsShown() then
  4.             _G["ChatFrame"..id.."ButtonFrame"]:SetWidth(1)
  5.             _G["ChatFrame"..id.."ButtonFrame"]:SetParent(UIParent)
  6.             _G["ChatFrame"..id.."ButtonFrame"]:Hide()
  7.         end
  8.         _G["ChatFrame"..id]:SetClampRectInsets(0, 0, 0, 0);
  9.     end
  10.    
  11. end
  12. AdjustChatButtonFrame()

the part you are all most interested in is the... _G["ChatFrame"..id]:SetClampRectInsets(0, 0, 0, 0); in fact ditch most of it or youll lose the buttons on the side without the rest of my code.... the SetClampRect blahblah reads 0,0,0,50 in wows code.

note that this only does it for chat frames 1-8 you can change that line to read a number of other things including 1,46 which if i remember correct skimming the code it looked like 46 or was it 48? was the max number of chat frames you could open at once now.
__________________
"Are we there yet?"

GrimUI
[SIGPIC][/SIGPIC]

Last edited by Grimsin : 06-29-10 at 10:37 PM.
  Reply With Quote
06-29-10, 10:43 PM   #25
Grimsin
A Molten Giant
 
Grimsin's Avatar
AddOn Author - Click to view addons
Join Date: Sep 2006
Posts: 990
this will get rid of the insets you will have to place it into another function or somewhere to hook to the chat frames like do ChatFrame..id:hookscript("OnShow", AdjustChatClampInset) do it for the update to maybe? or hook it to something else in some other way but this will get ride of the clamp insets. or just take it out of the function but cant guarantee the num chat frames will return proper numbers.

lua Code:
  1. local function AdjustChatClampInset(self)
  2.     for id = 1, NUM_CHAT_WINDOWS do
  3.         _G["ChatFrame"..id]:SetClampRectInsets(0, 0, 0, 0);
  4.     end
  5. end
__________________
"Are we there yet?"

GrimUI
[SIGPIC][/SIGPIC]
  Reply With Quote
06-30-10, 12:03 AM   #26
Xrystal
nUI Maintainer
 
Xrystal's Avatar
Premium Member
AddOn Author - Click to view addons
Join Date: Feb 2006
Posts: 5,928
Hmm, MAX_CHAT_WINDOWS is 10 though. I might have to look into that again cos Ive limited my addons to 10 windows.

Originally Posted by Grimsin View Post
i have a solution one moment while i attempt to make it fit your needs...

here

lua Code:
  1. local function AdjustChatButtonFrame(self)
  2.     for id = 1,8 do
  3.         if _G["ChatFrame"..id.."ButtonFrame"]:IsShown() then
  4.             _G["ChatFrame"..id.."ButtonFrame"]:SetWidth(1)
  5.             _G["ChatFrame"..id.."ButtonFrame"]:SetParent(UIParent)
  6.             _G["ChatFrame"..id.."ButtonFrame"]:Hide()
  7.         end
  8.         _G["ChatFrame"..id]:SetClampRectInsets(0, 0, 0, 0);
  9.     end
  10.    
  11. end
  12. AdjustChatButtonFrame()

the part you are all most interested in is the... _G["ChatFrame"..id]:SetClampRectInsets(0, 0, 0, 0); in fact ditch most of it or youll lose the buttons on the side without the rest of my code.... the SetClampRect blahblah reads 0,0,0,50 in wows code.

note that this only does it for chat frames 1-8 you can change that line to read a number of other things including 1,46 which if i remember correct skimming the code it looked like 46 or was it 48? was the max number of chat frames you could open at once now.
__________________


Characters:
Gwynedda - 70 - Demon Warlock
Galaviel - 65 - Resto Druid
Gamaliel - 61 - Disc Priest
Gwynytha - 60 - Survival Hunter
Lienae - 60 - Resto Shaman
Plus several others below level 60

Info Panel IDs : http://www.wowinterface.com/forums/s...818#post136818
  Reply With Quote
06-30-10, 06:30 PM   #27
sacrife
An Onyxian Warder
 
sacrife's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2009
Posts: 384
Is there a simple lua script to auto position the chatframe?

I tried this. Nothing happens.

Code:
	FCF_ValidateChatFramePosition = dummy 
	
	ChatFrame1:SetClampRectInsets(0,0,0,0)
	ChatFrame1:SetClampedToScreen(false)
	ChatFrame1:ClearAllPoints()
	ChatFrame1:SetPoint("BOTTOMLEFT", UIParent, 20, 20)
	ChatFrame1:SetWidth(440)
	ChatFrame1:SetHeight(130)
__________________

  Reply With Quote
06-30-10, 06:39 PM   #28
Taryble
A Molten Giant
 
Taryble's Avatar
Join Date: Jan 2009
Posts: 811
My auto-position script uses 2 SetPoints, one for the bottom left of the ChatFrame1, and one for the TopRight - the 2nd one ends up setting both the Width and Height, and works fine.
Code:
ChatFrame1:ClearAllPoints()
ChatFrame1:SetPoint("BOTTOMLEFT", 62, 31)
ChatFrame1:SetPoint("TOPRIGHT", "UIParent", "BOTTOMLEFT", 440, 176)
Thankfully, for the 1st setpoint, WoW assumes that UIParent is the parent, and that the corner you're anchoring is being anchored to the same corner of UIParent. Made it a lot shorter to type.
__________________
-- Taryble
  Reply With Quote
06-30-10, 06:45 PM   #29
sacrife
An Onyxian Warder
 
sacrife's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2009
Posts: 384
Originally Posted by Taryble View Post
My auto-position script uses 2 SetPoints, one for the bottom left of the ChatFrame1, and one for the TopRight - the 2nd one ends up setting both the Width and Height, and works fine.
Code:
ChatFrame1:ClearAllPoints()
ChatFrame1:SetPoint("BOTTOMLEFT", 62, 31)
ChatFrame1:SetPoint("TOPRIGHT", "UIParent", "BOTTOMLEFT", 440, 176)
Thankfully, for the 1st setpoint, WoW assumes that UIParent is the parent, and that the corner you're anchoring is being anchored to the same corner of UIParent. Made it a lot shorter to type.

Ok my bad for not explaining well.
If I have my code as a script or as a slash command. It works fine.
However it never saves, so a reloadui/relog resets its everytime.

So thats why I wanted it as an addon and load those settings every time. However nothing happens when I place it in an addon.
__________________

  Reply With Quote
06-30-10, 07:33 PM   #30
harrellj
A Flamescale Wyrmkin
Join Date: Jul 2009
Posts: 132
The only way that would work in an addon is if that particular bit of code is called frequently, or at least when the chatframe is updated (player entering world might be a good event to use).
  Reply With Quote
06-30-10, 08:18 PM   #31
sacrife
An Onyxian Warder
 
sacrife's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2009
Posts: 384
I tried that. Didn't work.
__________________

  Reply With Quote
06-30-10, 08:56 PM   #32
Taryble
A Molten Giant
 
Taryble's Avatar
Join Date: Jan 2009
Posts: 811
Honestly, I have that bit of script in a kgPanel, in the "OnUpdate" section.
__________________
-- Taryble
  Reply With Quote
06-30-10, 09:39 PM   #33
Sythalin
Curse staff
 
Sythalin's Avatar
AddOn Author - Click to view addons
Join Date: Aug 2006
Posts: 680
Originally Posted by Taryble View Post
Honestly, I have that bit of script in a kgPanel, in the "OnUpdate" section.
Alternatively, you can hook/set the "OnShow" script so that it readjusts itself anytime the frame appears (login, reloads, entering an instance, etc).
  Reply With Quote
07-01-10, 12:01 AM   #34
Taryble
A Molten Giant
 
Taryble's Avatar
Join Date: Jan 2009
Posts: 811
Thanks for the tip! :-)
__________________
-- Taryble
  Reply With Quote
07-01-10, 02:20 AM   #35
Ailae
A Rage Talon Dragon Guard
 
Ailae's Avatar
AddOn Author - Click to view addons
Join Date: Dec 2007
Posts: 318
I hooked FCF_RestorePositionAndDimensions and position my chatframe when it's called.
__________________
Oh, the simulated horror!
  Reply With Quote
07-01-10, 05:02 AM   #36
xromania™
A Frostmaul Preserver
 
xromania™'s Avatar
Join Date: Jun 2008
Posts: 284
we cant anymore make how large we want (on all screen to make a print screen for example) the chat window? after 5 years this game is still retard lol about some simple things
__________________
*sry my english
http://eu.battle.net/wow/en/characte...romania/simple
  Reply With Quote
07-01-10, 05:46 AM   #37
Haleth
This Space For Rent
 
Haleth's Avatar
Featured
Join Date: Sep 2008
Posts: 1,173
Okay I'm really stuck on this.

Code:
function dummy() end
FCF_ValidateChatFramePosition = dummy
FCF_RestorePositionAndDimensions = dummy
for i = 1, NUM_CHAT_WINDOWS do
	local frame = _G[("ChatFrame%d"):format(i)]
	frame:SetClampRectInsets(0, 0, 0, 0)
end

ChatFrame1:ClearAllPoints()
ChatFrame1:SetPoint("BOTTOMLEFT", UIParent, "BOTTOMLEFT", 50, 50)
ChatFrame1:SetHeight(121)
ChatFrame1:SetWidth(342)
ChatFrame1:SetUserPlaced(true)
What am I doing wrong?
  Reply With Quote
07-01-10, 07:42 AM   #38
sacrife
An Onyxian Warder
 
sacrife's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2009
Posts: 384
Originally Posted by Ailae View Post
I hooked FCF_RestorePositionAndDimensions and position my chatframe when it's called.
How did you do that exactly?
__________________

  Reply With Quote
07-01-10, 07:48 AM   #39
Ailae
A Rage Talon Dragon Guard
 
Ailae's Avatar
AddOn Author - Click to view addons
Join Date: Dec 2007
Posts: 318
Code:
hooksecurefunc("FCF_RestorePositionAndDimensions", function(...)
	ChatFrame1:ClearAllPoints()
	ChatFrame1:SetPoint("BOTTOMLEFT", UIParent, 35, 155)
	ChatFrame1:SetWidth(405)
	ChatFrame1:SetHeight(226)
	ChatFrame1:SetUserPlaced(true)
end)
__________________
Oh, the simulated horror!
  Reply With Quote
07-01-10, 08:07 AM   #40
Grimsin
A Molten Giant
 
Grimsin's Avatar
AddOn Author - Click to view addons
Join Date: Sep 2006
Posts: 990
If you dont set the insets itll do the bounce back nonsense. As for max chat frames i think it was in the fcf lua where youll find a spot that appears to make it so that you can have up to 40 something floating chat frames... ill look again...


ooooo yea.... how are some of you trying to move the frames?

this is the entirety of my chat code. you can see how i have moved things...

lua Code:
  1. local addonName, addon = ...
  2.  
  3. addon:RegisterDefaultSetting("chatInitialized", false)
  4. addon:RegisterDefaultSetting("showCombatLog", true)
  5. addon:RegisterDefaultSetting("showChatTabs", false)
  6.  
  7. local function OpenChatWindow(id)
  8.     if not select(7, GetChatWindowInfo(id)) then
  9.         local name = 'ChatFrame' .. id
  10.         _G[name]:Show()
  11.         _G[name .. 'Tab']:Show()
  12.         SetChatWindowShown(id, 1)
  13.     end
  14. end
  15.  
  16. local function AdjustChatMenuButton()
  17.     ChatFrameMenuButton:SetHeight(27)
  18.     ChatFrameMenuButton:SetWidth(27)
  19.     ChatFrameMenuButton:ClearAllPoints()
  20.     ChatFrameMenuButton:SetPoint("TOPRIGHT", ChatFrame1, "TOPRIGHT")
  21. end
  22.  
  23. AdjustChatMenuButton()
  24.  
  25. local function DownButtonFix(self)
  26.     for id = 1,8 do
  27.         _G["ChatFrame"..id.."ButtonFrameBottomButton"]:SetParent(_G["ChatFrame"..id])
  28.         _G["ChatFrame"..id.."ButtonFrameBottomButton"]:SetHeight(25)
  29.         _G["ChatFrame"..id.."ButtonFrameBottomButton"]:SetWidth(25)
  30.         _G["ChatFrame"..id.."ButtonFrameBottomButton"]:ClearAllPoints()
  31.         _G["ChatFrame"..id.."ButtonFrameBottomButton"]:SetPoint("BOTTOMRIGHT", "ChatFrame" .. id, "BOTTOMRIGHT")
  32.     if _G["ChatFrame" .. id]:AtBottom() then
  33.         _G["ChatFrame"..id.."ButtonFrameBottomButton"]:Hide()
  34.         else
  35.         _G["ChatFrame"..id.."ButtonFrameBottomButton"]:Show()
  36.         end
  37.     end
  38. end
  39.  
  40. local function MinimizeButtonFix(self)
  41.     for id = 2,8 do
  42.         _G["ChatFrame"..id.."ButtonFrameMinimizeButton"]:SetParent(_G["ChatFrame"..id])
  43.         _G["ChatFrame"..id.."ButtonFrameMinimizeButton"]:SetHeight(20)
  44.         _G["ChatFrame"..id.."ButtonFrameMinimizeButton"]:SetWidth(20)
  45.         _G["ChatFrame"..id.."ButtonFrameMinimizeButton"]:ClearAllPoints()
  46.         _G["ChatFrame"..id.."ButtonFrameMinimizeButton"]:SetPoint("TOPRIGHT", "ChatFrame" .. id, "TOPRIGHT")
  47.     end
  48. end
  49.  
  50.  
  51. local function AdjustChatButtonFrame(self)
  52.     for id = 1,8 do
  53.         if _G["ChatFrame"..id.."ButtonFrame"]:IsShown() then
  54.             _G["ChatFrame"..id.."ButtonFrame"]:SetWidth(1)
  55.             _G["ChatFrame"..id.."ButtonFrame"]:SetParent(UIParent)
  56.             _G["ChatFrame"..id.."ButtonFrame"]:Hide()
  57.         end
  58.         _G["ChatFrame"..id]:SetClampRectInsets(0, 0, 0, 0);
  59.     end
  60.    
  61. end
  62. AdjustChatButtonFrame()
  63.  
  64. local function UpDownButtonHide(slef)
  65.     for id = 1,8 do
  66.     if _G["ChatFrame"..id.."ButtonFrameUpButton"]:IsShown() then
  67.         _G["ChatFrame"..id.."ButtonFrameUpButton"]:Hide()
  68.     end
  69.    
  70.     if _G["ChatFrame"..id.."ButtonFrameDownButton"]:IsShown() then
  71.         _G["ChatFrame"..id.."ButtonFrameDownButton"]:Hide()
  72.     end
  73.     end
  74. end
  75.  
  76. local function BottomButtonClick(self)
  77.     PlaySound("igChatBottom")
  78.     self:GetParent():ScrollToBottom();
  79. end
  80.  
  81. local function MinimizeButtonClick(self)
  82.     local chatFrame = self:GetParent();
  83.     FCF_MinimizeFrame(chatFrame, strupper(chatFrame.buttonSide));
  84. end
  85.  
  86.  
  87. local function DropDownClick2(self, button)
  88.     local id = 2
  89.         local name = 'ChatFrame'..id
  90.         local chatFrame = _G[name]
  91.         -- If Rightclick bring up the options menu
  92.         if ( button == "RightButton" ) then
  93.             chatFrame:StopMovingOrSizing();
  94.             CURRENT_CHAT_FRAME_ID = chatFrame:GetID();
  95.             ToggleDropDownMenu(1, nil, _G["ChatFrame"..id.."TabDropDown"], chatFrame:GetName(), 0, 0);
  96.             return;
  97.         end
  98.  
  99.         -- Close all dropdowns
  100.         CloseDropDownMenus();
  101.  
  102.         -- If frame is docked assume that a click is to select a chat window, not drag it
  103.         SELECTED_CHAT_FRAME = chatFrame;
  104.         if ( chatFrame.isDocked and FCFDock_GetSelectedWindow(GENERAL_CHAT_DOCK) ~= chatFrame ) then
  105.             FCF_SelectDockFrame(chatFrame);
  106.             FCF_FadeInChatFrame(chatFrame);
  107.             return;
  108.         else
  109.             if ( GetCVar("chatStyle") ~= "classic" ) then
  110.                 ChatEdit_SetLastActiveWindow(chatFrame.editBox);
  111.             end
  112.             FCF_FadeInChatFrame(chatFrame);
  113.     end
  114. end
  115.  
  116. local function DropDownClick6(self, button)
  117.     local id = 6
  118.         local name = 'ChatFrame'..id
  119.         local chatFrame = _G[name]
  120.         -- If Rightclick bring up the options menu
  121.         if ( button == "RightButton" ) then
  122.             chatFrame:StopMovingOrSizing();
  123.             CURRENT_CHAT_FRAME_ID = chatFrame:GetID();
  124.             ToggleDropDownMenu(1, nil, _G["ChatFrame"..id.."TabDropDown"], chatFrame:GetName(), 0, 0);
  125.             return;
  126.         end
  127.  
  128.         -- Close all dropdowns
  129.         CloseDropDownMenus();
  130.  
  131.         -- If frame is docked assume that a click is to select a chat window, not drag it
  132.         SELECTED_CHAT_FRAME = chatFrame;
  133.         if ( chatFrame.isDocked and FCFDock_GetSelectedWindow(GENERAL_CHAT_DOCK) ~= chatFrame ) then
  134.             FCF_SelectDockFrame(chatFrame);
  135.             FCF_FadeInChatFrame(chatFrame);
  136.             return;
  137.         else
  138.             if ( GetCVar("chatStyle") ~= "classic" ) then
  139.                 ChatEdit_SetLastActiveWindow(chatFrame.editBox);
  140.             end
  141.             FCF_FadeInChatFrame(chatFrame);
  142.     end
  143. end
  144.  
  145. ChatFrame2ClickAnywhereButton:HookScript('OnClick', DropDownClick2)
  146. ChatFrame6ClickAnywhereButton:HookScript('OnClick', DropDownClick6)
  147.  
  148.  
  149. for id = 1,8 do
  150. _G["ChatFrame" .. id]:HookScript('OnShow', UpDownButtonHide)
  151. _G["ChatFrame" .. id]:HookScript('OnUpdate', UpDownButtonHide)
  152.  
  153. _G["ChatFrame" .. id]:HookScript('OnShow', AdjustChatButtonFrame)
  154. _G["ChatFrame" .. id]:HookScript('OnUpdate', AdjustChatButtonFrame)
  155.  
  156. _G["ChatFrame" .. id]:HookScript('OnShow', DownButtonFix)
  157. _G["ChatFrame" .. id]:HookScript('OnUpdate', DownButtonFix)
  158.  
  159. _G["ChatFrame" .. id]:HookScript('OnShow', MinimizeButtonFix)
  160. _G["ChatFrame" .. id]:HookScript('OnUpdate', MinimizeButtonFix)
  161.  
  162.  
  163. _G["ChatFrame"..id.."ButtonFrameBottomButton"]:SetScript("OnClick", BottomButtonClick)
  164.  
  165. _G["ChatFrame"..id.."ButtonFrameMinimizeButton"]:SetScript("OnClick", MinimizeButtonClick)
  166. end
  167.  
  168. ChatFrame1:SetFading(false)
  169.  
  170.  
  171.  
  172. local function InitializeChatFrames()
  173.     -- ChatFrame1
  174.     SetChatWindowDocked(1, 0)
  175.     RemoveChatWindowMessages(1, 'SKILL')
  176.     RemoveChatWindowMessages(1, 'LOOT')
  177.     RemoveChatWindowMessages(1, 'MONEY')
  178.     RemoveChatWindowMessages(1, 'COMBAT_FACTION_CHANGE')
  179.    
  180.     FCF_SetLocked(ChatFrame1, nil)
  181.     ChatFrame1:ClearAllPoints()
  182.     ChatFrame1:SetPoint('BOTTOMLEFT', GrimUIcoreArtB1, 'BOTTOMLEFT', 14, 30)
  183.     ChatFrame1:SetWidth(350)
  184.     ChatFrame1:SetHeight(187)
  185.     ChatFrame1:SetFrameLevel(8)
  186.     ChatFrame1:SetUserPlaced(true)
  187.    
  188.     FCF_SavePositionAndDimensions(ChatFrame1)
  189.    
  190.     -- ChatFrame2 (Combat Log)
  191.     OpenChatWindow(2)
  192.     FCF_SetLocked(ChatFrame2, nil)
  193.     FCF_UnDockFrame(ChatFrame2)
  194.     FCF_SetWindowAlpha(ChatFrame2, 1)
  195.  
  196.     ChatFrame2:ClearAllPoints()
  197.     ChatFrame2:SetPoint('BOTTOMRIGHT', GrimUIcoreArtB4, 'BOTTOMRIGHT', -13, 17)
  198.     ChatFrame2:SetWidth(143)
  199.     ChatFrame2:SetHeight(126)
  200.     ChatFrame2:SetFrameLevel(8)
  201.     ChatFrame2:SetUserPlaced(true)
  202.     FCF_SavePositionAndDimensions(ChatFrame2)
  203.    
  204.     --ChatFrame3 Trade/LFG
  205.     OpenChatWindow(3)
  206.     FCF_SetLocked(ChatFrame3, nil)
  207.     ChatFrame_RemoveAllMessageGroups(ChatFrame3)
  208.    
  209.     FCF_SetWindowName(ChatFrame3, "Trade/LFG")
  210.     ChatFrame_AddMessageGroup(ChatFrame3, 'WHISPER')
  211.  
  212.     -- ChatFrame4 Whisper
  213.     OpenChatWindow(4)
  214.     FCF_SetLocked(ChatFrame4, nil)
  215.     ChatFrame_RemoveAllMessageGroups(ChatFrame4)
  216.    
  217.     FCF_SetWindowName(ChatFrame4, "Whisper")
  218.     ChatFrame_AddMessageGroup(ChatFrame4, 'WHISPER')
  219.    
  220.    
  221.     --ChatFrame5 Guild
  222.     OpenChatWindow(5)
  223.     FCF_SetLocked(ChatFrame5, nil)
  224.     ChatFrame_RemoveAllMessageGroups(ChatFrame5)
  225.    
  226.     FCF_SetWindowName(ChatFrame5, "Guild")
  227.     ChatFrame_AddMessageGroup(ChatFrame5, 'GUILD')
  228.     ChatFrame_AddMessageGroup(ChatFrame5, 'GUILD_OFFICER')
  229.     ChatFrame_AddMessageGroup(ChatFrame5, 'GUILD_ACHIEVEMENT')
  230.     ChatFrame_AddMessageGroup(ChatFrame5, 'WHISPER')
  231.    
  232.  
  233.     --ChatFrame6 Info Log
  234.     OpenChatWindow(6)
  235.     FCF_SetLocked(ChatFrame6, nil)
  236.     ChatFrame_RemoveAllMessageGroups(ChatFrame6)
  237.     FCF_SetWindowName(ChatFrame6, "Info Log")
  238.     FCF_SetWindowAlpha(ChatFrame6, 1)
  239.     ChatFrame_AddMessageGroup(ChatFrame6, 'SKILL')
  240.     ChatFrame_AddMessageGroup(ChatFrame6, 'LOOT')
  241.     ChatFrame_AddMessageGroup(ChatFrame6, 'MONEY')
  242.     ChatFrame_AddMessageGroup(ChatFrame6, 'TRADESKILLS')
  243.     ChatFrame_AddMessageGroup(ChatFrame6, 'PET_INFO')
  244.     ChatFrame_AddMessageGroup(ChatFrame6, 'COMBAT_XP_GAIN')
  245.     ChatFrame_AddMessageGroup(ChatFrame6, 'OPENING')
  246.     ChatFrame_AddMessageGroup(ChatFrame6, 'COMBAT_MISC_INFO')
  247.     ChatFrame_AddMessageGroup(ChatFrame6, 'COMBAT_FACTION_CHANGE')
  248.     ChatFrame_AddMessageGroup(ChatFrame6, 'COMBAT_HONOR_GAIN')
  249.  
  250.     ChatFrame6:ClearAllPoints()
  251.     ChatFrame6:SetPoint('BOTTOMRIGHT', ChatFrame2, 'BOTTOMLEFT', -7, 0)
  252.     ChatFrame6:SetWidth(212)
  253.     ChatFrame6:SetHeight(130)
  254.     ChatFrame6:SetFrameLevel(10)
  255.     ChatFrame6:SetUserPlaced(true)
  256.    
  257.     FCF_SavePositionAndDimensions(ChatFrame6)
  258.        
  259.     FCF_DockFrame( ChatFrame3, #FCFDock_GetChatFrames(GENERAL_CHAT_DOCK)+1, false );
  260.     FCF_DockFrame( ChatFrame4, #FCFDock_GetChatFrames(GENERAL_CHAT_DOCK)+1, false );
  261.     FCF_DockFrame( ChatFrame5, #FCFDock_GetChatFrames(GENERAL_CHAT_DOCK)+1, false );
  262.    
  263.     FCF_SetLocked(ChatFrame1, 1)
  264.     FCF_SetLocked(ChatFrame2, 1)
  265.     FCF_SetLocked(ChatFrame3, 1)
  266.     FCF_SetLocked(ChatFrame4, 1)
  267.     FCF_SetLocked(ChatFrame5, 1)
  268.     FCF_SetLocked(ChatFrame6, 1)
  269.    
  270.     end
  271.  
  272.  
  273. local function ConfigureChatFrames()
  274.  
  275.     -- ChatFrame1
  276.     --addon:LockFrame(ChatFrame1)
  277.     --FCF_SetLocked(ChatFrame1, 1)
  278.  
  279.     -- ChatFrame2 Combat Log
  280.     --addon:LockFrame(ChatFrame2)
  281.     addon:ConfigureCombatLog()
  282.  
  283.     -- ChatFrame6 Info Log
  284.     --addon:LockFrame(ChatFrame6)
  285.    
  286.     addon:ConfigureChatTabs()
  287.     RemoveChatWindowChannel(1, 'Trade')
  288.     ChatFrame_AddChannel(ChatFrame3, 'Trade')
  289. end
  290.  
  291. --[[-----------------------------------------------------------------------------
  292. ConfigureChatTabs - Hide or show chat frame 2 and 6 chat tabs.
  293. -------------------------------------------------------------------------------]]
  294. function addon:ConfigureChatTabs()
  295.     if addon.settings.showChatTabs then
  296.         addon:ShowFrame(ChatFrame2Tab)
  297.         addon:ShowFrame(ChatFrame6Tab)
  298.     else
  299.        
  300.         addon:HideFrame(ChatFrame2Tab)
  301.         addon:HideFrame(ChatFrame6Tab)
  302.     end
  303. end
  304.  
  305. --[[-----------------------------------------------------------------------------
  306. ConfigureCombatLog - Hide or show the combat log based on settings
  307. -------------------------------------------------------------------------------]]
  308. function addon:ConfigureCombatLog()
  309.     if addon.settings.showCombatLog then
  310.         addon:ShowFrame(ChatFrame2)
  311.     else
  312.         addon:HideFrame(ChatFrame2)
  313.     end
  314. end
  315.  
  316. --[[-----------------------------------------------------------------------------
  317. ResetChatFrames
  318. -------------------------------------------------------------------------------]]
  319.  
  320. function addon:ResetChatFrames()
  321.     ChatFrame2.Show = nil
  322.     AdjustChatButtonFrame()
  323.     InitializeChatFrames()
  324.     ConfigureChatFrames()
  325.     InitializeChatFrames()
  326.  
  327. end
  328.  
  329. -----------------------------------------------------------------------------
  330. --Support for link hover tooltips
  331. -------------------------------------------------------------------------------
  332. local allowed = { item = true, enchant = true, spell = true, quest = true, unit = true, talent = true, achievement = true, glyph = true }
  333. local oldOnEnter, oldOnLeave = { }, { }
  334.  
  335. local function OnHyperlinkEnter(frame, link, ...)
  336.     if allowed[link:match("^([^:]+)")] then
  337.         GameTooltip:SetOwner(frame, 'ANCHOR_TOPLEFT')
  338.         GameTooltip:SetHyperlink(link)
  339.         GameTooltip:Show()
  340.     end
  341.     if oldOnEnter[frame] then
  342.         return oldOnEnter[frame](frame, link, ...)
  343.     end
  344. end
  345.  
  346. local function OnHyperlinkLeave(frame, ...)
  347.     GameTooltip:Hide()
  348.     if oldOnLeave[frame] then
  349.         return oldOnLeave[frame](frame, ...)
  350.     end
  351. end
  352.  
  353.  
  354.  
  355.  
  356. -----------------------------------------------------------------------------
  357. --Initialize
  358. -------------------------------------------------------------------------------
  359. addon.RegisterEvent("ChatFrames-Initialize", 'PLAYER_ENTERING_WORLD', function(self, event)
  360.     addon.UnregisterEvent(self, event)
  361.     AdjustChatButtonFrame()
  362.     if not addon.settings.chatInitialized then
  363.         InitializeChatFrames()
  364.  
  365.         addon.settings.chatInitialized = true
  366.     end
  367.    
  368.     ConfigureChatFrames()
  369.    
  370.     -- reshow combatlog quick filter buttons start
  371.     CombatLogQuickButtonFrame_Custom:SetParent(ChatFrame2)
  372.     CombatLogQuickButtonFrame_Custom.SetParent = addon.DoNothing
  373.    
  374.     CombatLogQuickButtonFrame_Custom:Show()
  375.     CombatLogQuickButtonFrame_Custom.Hide = addon.DoNothing
  376.     -- reshow combatlog quick filter buttons end
  377.  
  378.      
  379.     for i = 1, NUM_CHAT_WINDOWS do
  380.         local eb = _G['ChatFrame'..i..'EditBox']
  381.         eb:Hide()
  382.         eb:HookScript('OnEnterPressed', function(s) s:Hide() end)
  383.     end
  384.    
  385.     for id = 1, NUM_CHAT_WINDOWS do
  386.         local frame = _G['ChatFrame' .. id]
  387.         if frame then
  388.             oldOnEnter[frame] = frame:GetScript('OnHyperlinkEnter')
  389.             frame:SetScript('OnHyperlinkEnter', OnHyperlinkEnter)
  390.  
  391.             oldOnLeave[frame] = frame:GetScript('OnHyperlinkLeave')
  392.             frame:SetScript('OnHyperlinkLeave', OnHyperlinkLeave)
  393.  
  394.         end
  395.     end
  396.  
  397.     --UIPARENT_MANAGED_FRAME_POSITIONS['ChatFrame1'] = nil
  398.     --UIPARENT_MANAGED_FRAME_POSITIONS['ChatFrame2'] = nil
  399. end)
__________________
"Are we there yet?"

GrimUI
[SIGPIC][/SIGPIC]

Last edited by Grimsin : 07-01-10 at 08:10 AM.
  Reply With Quote

WoWInterface » AddOns, Compilations, Macros » AddOn Help/Support » Chat box not keeping position.


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off