Thread Tools Display Modes
06-24-10, 07:49 PM   #1
kneeki
A Flamescale Wyrmkin
 
kneeki's Avatar
AddOn Author - Click to view addons
Join Date: Jan 2006
Posts: 134
ChatFrame1EditBox no longer auto hiding

With the 3.3.5 patch, ChatFrame1EditBox (or any edit boxes from other chat windows) no longer auto hide. How do I go about getting auto hide enabled again? Any ideas?
  Reply With Quote
06-24-10, 09:23 PM   #2
Seerah
Fishing Trainer
 
Seerah's Avatar
WoWInterface Super Mod
Featured
Join Date: Oct 2006
Posts: 10,860
Besides selecting "Classic Chat" from the dropdown in the Interface Options? (on the social page)

Haven't quite gotten there yet myself, though I hear that a few addons have. (Chatter, PhanxChat....)
__________________
"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
06-28-10, 09:13 AM   #3
Grimsin
A Molten Giant
 
Grimsin's Avatar
AddOn Author - Click to view addons
Join Date: Sep 2006
Posts: 990
Auto hide how do you mean? So that the chat edit box disappears when you are not using the chat window? Mine appears to fade out although its still visible. Does so on what ever chat window is selected. Do you want it to fade all the way? or do you want the chat box hidden always? Im working on chat right now since 3.3.5 broke my chat code... i like the new edit box behavior except the fact it appears on windows with no output channels IE the combatlog... which is what im working on right now. Making it so the chat edit box never appears on the combat log. actually trying to make it so the combatlog edit box reanchors to where ever general chat is so if you select the combat log the chat edit box will appear for it but it will appear in the same place as the general chat edit box which is where the output of the combatlog edit box goes anyhow.
__________________
"Are we there yet?"

GrimUI
[SIGPIC][/SIGPIC]
  Reply With Quote
06-28-10, 09:40 PM   #4
kneeki
A Flamescale Wyrmkin
 
kneeki's Avatar
AddOn Author - Click to view addons
Join Date: Jan 2006
Posts: 134
Yep, pre 3.3.5 the Edit Box would disappear unless you were typing. I would like to achieve this same effect without having to use the legacy chat window. I'm still working on this issue =(
  Reply With Quote
06-29-10, 01:42 AM   #5
Waverian
A Chromatic Dragonspawn
AddOn Author - Click to view addons
Join Date: Dec 2006
Posts: 188
Code:
for i = 1, NUM_CHAT_WINDOWS do
	local eb = _G['ChatFrame'..i..'EditBox']
	eb:Hide()
	eb:HookScript('OnEnterPressed', function(s) s:Hide() end)
end
  Reply With Quote
06-29-10, 07:52 PM   #6
kneeki
A Flamescale Wyrmkin
 
kneeki's Avatar
AddOn Author - Click to view addons
Join Date: Jan 2006
Posts: 134
Yip!!! Awesome!! Thanks!
  Reply With Quote
06-30-10, 09:31 PM   #7
kneeki
A Flamescale Wyrmkin
 
kneeki's Avatar
AddOn Author - Click to view addons
Join Date: Jan 2006
Posts: 134
As that worked wonderfully, is there some way to also retain the auto complete when sending messages?
  Reply With Quote
07-01-10, 11:19 PM   #8
Grimsin
A Molten Giant
 
Grimsin's Avatar
AddOn Author - Click to view addons
Join Date: Sep 2006
Posts: 990
good question. trying to figure that out now.
__________________
"Are we there yet?"

GrimUI
[SIGPIC][/SIGPIC]
  Reply With Quote
07-01-10, 11:26 PM   #9
Waverian
A Chromatic Dragonspawn
AddOn Author - Click to view addons
Join Date: Dec 2006
Posts: 188
Autocomplete for recipient names? My code shouldn't change that at all, it still works for me.

Also keep in mind that code doesn't fully replicate classic style, which I realized afterwards. The editbox will still persist after escaping a message or when the chat frame gains focus... Solutions for that should be pretty easy to figure out given what you already know. Check wowprogramming's widget script handlers documentation.
  Reply With Quote
07-02-10, 02:41 AM   #10
mentalnutsy
A Cyclonian
AddOn Author - Click to view addons
Join Date: Apr 2008
Posts: 47
To hide the edit box i have used this and works like a charm for me instead of actualy hiding the edit box it just makes it invisible so to speak





Code:
	
for i = 1, NUM_CHAT_WINDOWS do
local editBoxleft = _G[format("%s%d%s", "ChatFrame", i, "EditBoxLeft")]
local editBoxright = _G[format("%s%d%s", "ChatFrame", i, "EditBoxRight")]
local editBoxmid = _G[format("%s%d%s", "ChatFrame", i, "EditBoxMid")]
			editBoxleft:SetAlpha(0)
			editBoxright:SetAlpha(0)
			editBoxmid:SetAlpha(0)
end

Last edited by mentalnutsy : 07-02-10 at 02:43 AM.
  Reply With Quote
07-02-10, 08:13 AM   #11
Grimsin
A Molten Giant
 
Grimsin's Avatar
AddOn Author - Click to view addons
Join Date: Sep 2006
Posts: 990
Originally Posted by Waverian View Post
Autocomplete for recipient names? My code shouldn't change that at all, it still works for me.

Also keep in mind that code doesn't fully replicate classic style, which I realized afterwards. The editbox will still persist after escaping a message or when the chat frame gains focus... Solutions for that should be pretty easy to figure out given what you already know. Check wowprogramming's widget script handlers documentation.
I used your hide snippet to hide the frame and yea when you try to tab to the autocomplete then hit enter it does not auto complete it hides the edit box lol.
__________________
"Are we there yet?"

GrimUI
[SIGPIC][/SIGPIC]
  Reply With Quote
07-02-10, 08:16 AM   #12
Grimsin
A Molten Giant
 
Grimsin's Avatar
AddOn Author - Click to view addons
Join Date: Sep 2006
Posts: 990
Originally Posted by mentalnutsy View Post
To hide the edit box i have used this and works like a charm for me instead of actualy hiding the edit box it just makes it invisible so to speak





Code:
	
for i = 1, NUM_CHAT_WINDOWS do
local editBoxleft = _G[format("%s%d%s", "ChatFrame", i, "EditBoxLeft")]
local editBoxright = _G[format("%s%d%s", "ChatFrame", i, "EditBoxRight")]
local editBoxmid = _G[format("%s%d%s", "ChatFrame", i, "EditBoxMid")]
			editBoxleft:SetAlpha(0)
			editBoxright:SetAlpha(0)
			editBoxmid:SetAlpha(0)
end
this looks like it would forever make it invisible though.
__________________
"Are we there yet?"

GrimUI
[SIGPIC][/SIGPIC]
  Reply With Quote
07-02-10, 08:22 AM   #13
Waverian
A Chromatic Dragonspawn
AddOn Author - Click to view addons
Join Date: Dec 2006
Posts: 188
It only hides the textures. The editbox itself is still always shown.
  Reply With Quote
07-02-10, 12:45 PM   #14
mentalnutsy
A Cyclonian
AddOn Author - Click to view addons
Join Date: Apr 2008
Posts: 47
Originally Posted by Waverian View Post
It only hides the textures. The editbox itself is still always shown.
So it looks like you have no edit box until you start typing. Then you get an edit box without a border.

Attached screenys so u can see what it looks like
Attached Thumbnails
Click image for larger version

Name:	WoWScrnShot_070210_194231.jpg
Views:	1049
Size:	168.3 KB
ID:	4546  Click image for larger version

Name:	WoWScrnShot_070210_194236.jpg
Views:	875
Size:	167.5 KB
ID:	4547  
  Reply With Quote
07-02-10, 01:18 PM   #15
Grimsin
A Molten Giant
 
Grimsin's Avatar
AddOn Author - Click to view addons
Join Date: Sep 2006
Posts: 990
yea i saw that better imo then the onenter hideing since that at lest for me broke the tab complete enter
__________________
"Are we there yet?"

GrimUI
[SIGPIC][/SIGPIC]
  Reply With Quote
07-05-10, 08:06 PM   #16
kneeki
A Flamescale Wyrmkin
 
kneeki's Avatar
AddOn Author - Click to view addons
Join Date: Jan 2006
Posts: 134
Originally Posted by Grimsin View Post
I used your hide snippet to hide the frame and yea when you try to tab to the autocomplete then hit enter it does not auto complete it hides the edit box lol.
Yeah exactly. I'm still wracking my brain on this =p
  Reply With Quote
07-05-10, 09:48 PM   #17
Rilgamon
Premium Member
 
Rilgamon's Avatar
Premium Member
AddOn Author - Click to view addons
Join Date: Sep 2009
Posts: 822
I have hooked OnEditFocusGained, OnEditFocusLost to show/hide the border in my OldChat AddOn which was inspired by this discussion

Code:
local _G = _G
local hooked = {}
--[[*** Settings Start***]]
local HideBorder = true -- Hides the editboxborder when not active
local UnClamp = true -- Make the window movable (take care! you can move it out of your screen)
local HideFriendButton = true -- Hide the friendsbutton
local Unsticky = true -- Dont remember whispers for next enter
--[[*** Settings End***]]

local function focusToggle(self)
	local name,tex = self:GetName()
	if(self:HasFocus()) then
		tex = _G[name..'Left']
		tex:Show()
		tex = _G[name..'Right']
		tex:Show()
		tex = _G[name..'Mid']
		tex:Show()
	else
		tex = _G[name..'Left']
		tex:Hide()
		tex = _G[name..'Right']
		tex:Hide()
		tex = _G[name..'Mid']
		tex:Hide()	
	end
end

local function hookFrame(self)
	if(not hooked[self]) then
		self:HookScript("OnEditFocusGained",focusToggle)
		self:HookScript("OnEditFocusLost",focusToggle)
		hooked[self] = true
	end
	return
end

local function freechat()
	for i = 1, NUM_CHAT_WINDOWS do
		if(UnClamp) then
			local cf = _G['ChatFrame'..i]
			cf:SetClampedToScreen(false)
		end
		if(HideBorder) then
			local ef = _G['ChatFrame'..i..'EditBox']
			focusToggle(ef)
			hookFrame(ef)
		end
	end
	if(HideFriendButton) then
		local fb = _G['FriendsMicroButton']
		fb:UnregisterAllEvents()
		if(not hooked[fb]) then
			fb:HookScript("OnShow", function(self) self:Hide() end)
			hooked[fb] = true
		end
		fb:Hide()
	end
	if(Unsticky) then
		ChatTypeInfo['WHISPER']['sticky'] = 0
		ChatTypeInfo['BN_WHISPER']['sticky'] = 0
	end
end

local frame = CreateFrame("Frame")
frame:RegisterEvent("ADDON_LOADED")
frame:RegisterEvent("UPDATE_CHAT_WINDOWS")
frame:SetScript("OnEvent", freechat)
__________________
The cataclysm broke the world ... and the pandas could not fix it!
  Reply With Quote
07-05-10, 10:41 PM   #18
kneeki
A Flamescale Wyrmkin
 
kneeki's Avatar
AddOn Author - Click to view addons
Join Date: Jan 2006
Posts: 134
I've changed your code just a tad bit, and it now has the perfect functionality (for me) ! Thanks so much!!
  Reply With Quote

WoWInterface » Developer Discussions » Lua/XML Help » ChatFrame1EditBox no longer auto hiding

Thread Tools
Display Modes

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