Thread Tools Display Modes
06-23-10, 09:24 AM   #1
Striph
A Deviate Faerie Dragon
AddOn Author - Click to view addons
Join Date: Mar 2005
Posts: 15
Chat input event?

I've created a quick lua mod to hide the chatinput box by default while retaining the "IM Style" option. When i load in its hidden, but as soon as i type something and press enter, it resets it back to being shown. I have a slash command to rehide it and it works, but if i say something in game it resets it.

Is there a way to do an event for when you say something in the input box that you could call something? That way I could just rehide it everytime the box is used.
  Reply With Quote
06-23-10, 09:32 AM   #2
Xrystal
nUI Maintainer
 
Xrystal's Avatar
Premium Member
AddOn Author - Click to view addons
Join Date: Feb 2006
Posts: 5,892
Yeah, thats been annoying the hell out of me myself but so far not come across any new events that were set up.
__________________
  Reply With Quote
06-23-10, 10:23 AM   #3
cloudwolf
A Black Drake
AddOn Author - Click to view addons
Join Date: Mar 2008
Posts: 87
couldn't you just run a check if its visible on update and if it is hide it? if frame:visible then frame:hide end OnUpdate?
  Reply With Quote
06-23-10, 10:32 AM   #4
Xrystal
nUI Maintainer
 
Xrystal's Avatar
Premium Member
AddOn Author - Click to view addons
Join Date: Feb 2006
Posts: 5,892
Its possible, but I try to personally avoid OnUpdates where I can. And only as a last resort so while its annoying me it hasn't got to the point where I am doing anything about it yet. My chat frame addons have more pressing issues
__________________
  Reply With Quote
06-23-10, 10:42 AM   #5
Striph
A Deviate Faerie Dragon
AddOn Author - Click to view addons
Join Date: Mar 2005
Posts: 15
I managed to get it to work using an OnEnter event in the XML to call the function again. But i have to set the cvar for "chatStyle" to classic to override the built in "Chat OnEnter" call. Hrm! That switches it to classic overall, I'd like to retain the IM input box style on each window, but auto hide the input boxes.

So close!
  Reply With Quote
06-23-10, 11:51 AM   #6
Xrystal
nUI Maintainer
 
Xrystal's Avatar
Premium Member
AddOn Author - Click to view addons
Join Date: Feb 2006
Posts: 5,892
Ah, spotted something but haven't had the opportunity to utilise it yet. My chatframe addons aren't behaving the way I want rofl.

I spotted this in the FloatingChatFrame.lua file for the latest patch.
--Close the Editbox
ChatEdit_DeactivateChat(chatFrame.editBox);
__________________
  Reply With Quote

WoWInterface » Developer Discussions » Lua/XML Help » Chat input event?

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