diff --git a/src/game/client/components/menus_demo.cpp b/src/game/client/components/menus_demo.cpp index c0f953e35..7282bccb4 100644 --- a/src/game/client/components/menus_demo.cpp +++ b/src/game/client/components/menus_demo.cpp @@ -458,7 +458,7 @@ void CMenus::RenderDemoPlayer(CUIRect MainView) // close button ButtonBar.VSplitRight(ButtonbarHeight*3, &ButtonBar, &Button); static int s_ExitButton = 0; - if(DoButton_DemoPlayer(&s_ExitButton, Localize("Close"), 0, &Button) || Input()->KeyPress(KEY_C)) + if(DoButton_DemoPlayer(&s_ExitButton, Localize("Close"), 0, &Button) || (Input()->KeyPress(KEY_C) && m_pClient->m_pGameConsole->IsClosed() && m_DemoPlayerState == DEMOPLAYER_NONE)) { Client()->Disconnect(); DemolistOnUpdate(false); @@ -1251,7 +1251,7 @@ void CMenus::RenderDemoList(CUIRect MainView) } static int s_PlayButton = 0; - if(DoButton_Menu(&s_PlayButton, m_DemolistSelectedIsDir ? Localize("Open") : Localize("Play", "Demo browser"), 0, &PlayRect) || Activated || Input()->KeyPress(KEY_P)) + if(DoButton_Menu(&s_PlayButton, m_DemolistSelectedIsDir ? Localize("Open") : Localize("Play", "Demo browser"), 0, &PlayRect) || Activated || (Input()->KeyPress(KEY_P) && m_pClient->m_pGameConsole->IsClosed() && m_DemoPlayerState == DEMOPLAYER_NONE)) { if(m_DemolistSelectedIndex >= 0) { @@ -1288,7 +1288,7 @@ void CMenus::RenderDemoList(CUIRect MainView) if(!m_DemolistSelectedIsDir) { static int s_DeleteButton = 0; - if(DoButton_Menu(&s_DeleteButton, Localize("Delete"), 0, &DeleteRect) || m_DeletePressed || Input()->KeyPress(KEY_D)) + if(DoButton_Menu(&s_DeleteButton, Localize("Delete"), 0, &DeleteRect) || m_DeletePressed || (Input()->KeyPress(KEY_D) && m_pClient->m_pGameConsole->IsClosed())) { if(m_DemolistSelectedIndex >= 0) { @@ -1312,7 +1312,7 @@ void CMenus::RenderDemoList(CUIRect MainView) #if defined(CONF_VIDEORECORDER) static int s_RenderButton = 0; - if(DoButton_Menu(&s_RenderButton, Localize("Render"), 0, &RenderRect) || Input()->KeyPress(KEY_R)) + if(DoButton_Menu(&s_RenderButton, Localize("Render"), 0, &RenderRect) || (Input()->KeyPress(KEY_R) && m_pClient->m_pGameConsole->IsClosed())) { if(m_DemolistSelectedIndex >= 0) {