diff options
| author | oy <Tom_Adams@web.de> | 2010-09-12 12:43:03 +0200 |
|---|---|---|
| committer | oy <Tom_Adams@web.de> | 2010-09-12 12:43:03 +0200 |
| commit | e226b4721238c84600fe25dc4dd46cec16d1fa5d (patch) | |
| tree | ee577e0a9535d38dc434af5848ef28ef58d88b8d /src/game/client/components/chat.cpp | |
| parent | d913af1ab2d383832a49ed6a4460523f80b8337d (diff) | |
| download | zcatch-e226b4721238c84600fe25dc4dd46cec16d1fa5d.tar.gz zcatch-e226b4721238c84600fe25dc4dd46cec16d1fa5d.zip | |
close the emote selector, chat history and the scoreboard when closing the chat, console or ingame menu. Closes #111
Diffstat (limited to 'src/game/client/components/chat.cpp')
| -rw-r--r-- | src/game/client/components/chat.cpp | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/game/client/components/chat.cpp b/src/game/client/components/chat.cpp index 60b62188..d0b216a5 100644 --- a/src/game/client/components/chat.cpp +++ b/src/game/client/components/chat.cpp @@ -33,6 +33,11 @@ void CChat::OnReset() m_Show = false; } +void CChat::OnRelease() +{ + m_Show = false; +} + void CChat::OnStateChange(int NewState, int OldState) { if(OldState <= IClient::STATE_CONNECTING) @@ -84,12 +89,16 @@ bool CChat::OnInput(IInput::CEvent e) return false; if(e.m_Flags&IInput::FLAG_PRESS && e.m_Key == KEY_ESCAPE) + { m_Mode = MODE_NONE; + m_pClient->OnRelease(); + } else if(e.m_Flags&IInput::FLAG_PRESS && (e.m_Key == KEY_RETURN || e.m_Key == KEY_KP_ENTER)) { if(m_Input.GetString()[0]) Say(m_Mode == MODE_ALL ? 0 : 1, m_Input.GetString()); m_Mode = MODE_NONE; + m_pClient->OnRelease(); } else m_Input.ProcessInput(e); |