diff --git a/src/game/client/components/console.cpp b/src/game/client/components/console.cpp index 5e75b5d32..d275f09cf 100644 --- a/src/game/client/components/console.cpp +++ b/src/game/client/components/console.cpp @@ -673,6 +673,11 @@ void CGameConsole::ConchainConsoleOutputLevelUpdate(IConsole::IResult *pResult, } } +bool CGameConsole::IsConsoleActive() +{ + return m_ConsoleState != CONSOLE_CLOSED; +} + void CGameConsole::PrintLine(int Type, const char *pLine) { if(Type == CONSOLETYPE_LOCAL) diff --git a/src/game/client/components/console.h b/src/game/client/components/console.h index 786ce1480..e5e4906cf 100644 --- a/src/game/client/components/console.h +++ b/src/game/client/components/console.h @@ -90,6 +90,7 @@ public: CGameConsole(); + bool IsConsoleActive(); void PrintLine(int Type, const char *pLine); virtual void OnStateChange(int NewState, int OldState); diff --git a/src/game/client/components/menus.cpp b/src/game/client/components/menus.cpp index f459123b0..fff71013e 100644 --- a/src/game/client/components/menus.cpp +++ b/src/game/client/components/menus.cpp @@ -21,6 +21,7 @@ #include #include +#include #include #include #include @@ -447,11 +448,14 @@ int CMenus::DoEditBox(void *pID, const CUIRect *pRect, char *pStr, unsigned StrS } } - for(int i = 0; i < Input()->NumEvents(); i++) + if(!m_pClient->m_pGameConsole->IsConsoleActive()) { - Len = str_length(pStr); - int NumChars = Len; - ReturnValue |= CLineInput::Manipulate(Input()->GetEvent(i), pStr, StrSize, StrSize, &Len, &s_AtIndex, &NumChars); + for(int i = 0; i < Input()->NumEvents(); i++) + { + Len = str_length(pStr); + int NumChars = Len; + ReturnValue |= CLineInput::Manipulate(Input()->GetEvent(i), pStr, StrSize, StrSize, &Len, &s_AtIndex, &NumChars); + } } }