mirror of
https://github.com/ddnet/ddnet.git
synced 2024-11-19 14:38:18 +00:00
Add Spacebar for toggling Play/Pause
Closes #1268; Added spacebar for swiching between play/pause in demoplayer
This commit is contained in:
parent
6821703f95
commit
d4f749c88e
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue