From e226b4721238c84600fe25dc4dd46cec16d1fa5d Mon Sep 17 00:00:00 2001 From: oy Date: Sun, 12 Sep 2010 12:43:03 +0200 Subject: close the emote selector, chat history and the scoreboard when closing the chat, console or ingame menu. Closes #111 --- src/game/client/components/chat.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'src/game/client/components/chat.cpp') 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); -- cgit 1.4.1