Add Spacebar for toggling Play/Pause

Closes #1268; Added spacebar for swiching between
play/pause in demoplayer
This commit is contained in:
Henningstone 2014-11-30 12:25:39 +01:00 committed by oy
parent 6821703f95
commit d4f749c88e

View file

@ -143,6 +143,19 @@ void CMenus::RenderDemoPlayer(CUIRect MainView)
bool IncreaseDemoSpeed = false, DecreaseDemoSpeed = false;
//add spacebar for toggling Play/Pause
if(Input()->KeyDown(KEY_SPACE))
{
if(!pInfo->m_Paused)
{
DemoPlayer()->Pause();
}
else
{
DemoPlayer()->Unpause();
}
}
if(m_MenuActive)
{
// do buttons