Thread Tools Display Modes
08-05-11, 02:50 PM   #1
Nonus
A Deviate Faerie Dragon
 
Nonus's Avatar
Join Date: Aug 2011
Posts: 10
Hardcoding chat

Does anyone have information of how i can force an addon to:
Create a new tab called "Trade" at an predifined position
and edit the options of what messages i want it to show(hide all messages except for Trade channel and System messages)
It is essential that all elements of the chat gets hardcoded(position, editbox etc)

I have tried to search for answers but most addons don't include this feature and one that does this is ElvUI which is an entire suite with custom functions.
  Reply With Quote
08-05-11, 03:06 PM   #2
Seerah
Fishing Trainer
 
Seerah's Avatar
WoWInterface Super Mod
Featured
Join Date: Oct 2006
Posts: 10,860
This should get you started: http://wowprogramming.com/docs/api_categories#chat

Also, look at the API and implementation itself here:
http://wowprogramming.com/utils/xmlbrowser
__________________
"You'd be surprised how many people violate this simple principle every day of their lives and try to fit square pegs into round holes, ignoring the clear reality that Things Are As They Are." -Benjamin Hoff, The Tao of Pooh

  Reply With Quote
08-06-11, 06:20 AM   #3
Nonus
A Deviate Faerie Dragon
 
Nonus's Avatar
Join Date: Aug 2011
Posts: 10
Code:
		FCF_ResetChatWindows()
			FCF_SetLocked(ChatFrame1, 1)
			FCF_DockFrame(ChatFrame2)
			FCF_SetLocked(ChatFrame2, 1)

			FCF_OpenNewWindow(LOOT)
			FCF_UnDockFrame(ChatFrame3)
			FCF_SetLocked(ChatFrame3, 1)
			ChatFrame3:Show()			

		for i = 1, NUM_CHAT_WINDOWS do
			

			_G["ChatFrame"..i]:SetMovable(true)
			_G["ChatFrame"..i]:SetUserPlaced(true)
			_G["ChatFrame"..i]:SetHeight(135)
			_G["ChatFrame"..i]:SetWidth(414)
			_G["ChatFrame"..i]:ClearAllPoints()
			-- move general bottom left
			if i == 3 then
				_G["ChatFrame"..i]:SetPoint("BOTTOM", 462, 47)
			else
				_G["ChatFrame"..i]:SetPoint("BOTTOM", -462, 47)
			end
			FCF_SavePositionAndDimensions(_G["ChatFrame"..i])
			FCF_SetLocked(_G["ChatFrame"..i], 1)
That is a code snippet of my code, but i have one more problem, when this function runs it positions the general chat and combatlog correctly but the "Loot"(ChatFrame3) stays at the position as if it was docked and only when i manually move the frame; it goes to the correct position when i release the mousebutton.
What do i have to do to force it to be at the given location without interaction?
  Reply With Quote

WoWInterface » Developer Discussions » Lua/XML Help » Hardcoding chat


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