mirror of
https://github.com/ddnet/ddnet.git
synced 2024-11-19 14:38:18 +00:00
added +/- for speed-up/slow-down in the demo player. Closes #1268
This commit is contained in:
parent
d4f749c88e
commit
5c83148fc6
|
@ -1 +1 @@
|
|||
Subproject commit 7d27950a169ae9f4692e9935dc9cae1331a038f2
|
||||
Subproject commit 61edb4fd35f15667cde8eb1cf80e5b0b30787a0b
|
|
@ -147,13 +147,9 @@ void CMenus::RenderDemoPlayer(CUIRect MainView)
|
|||
if(Input()->KeyDown(KEY_SPACE))
|
||||
{
|
||||
if(!pInfo->m_Paused)
|
||||
{
|
||||
DemoPlayer()->Pause();
|
||||
}
|
||||
else
|
||||
{
|
||||
DemoPlayer()->Unpause();
|
||||
}
|
||||
}
|
||||
|
||||
if(m_MenuActive)
|
||||
|
@ -227,7 +223,7 @@ void CMenus::RenderDemoPlayer(CUIRect MainView)
|
|||
TextRender()->TextEx(&Cursor, aBuf, -1);
|
||||
}
|
||||
|
||||
if(IncreaseDemoSpeed || Input()->KeyPresses(KEY_MOUSE_WHEEL_UP))
|
||||
if(IncreaseDemoSpeed || Input()->KeyPresses(KEY_MOUSE_WHEEL_UP) || Input()->KeyDown(KEY_PLUS) || Input()->KeyDown(KEY_KP_PLUS))
|
||||
{
|
||||
if(pInfo->m_Speed < 0.1f) DemoPlayer()->SetSpeed(0.1f);
|
||||
else if(pInfo->m_Speed < 0.25f) DemoPlayer()->SetSpeed(0.25f);
|
||||
|
@ -238,7 +234,7 @@ void CMenus::RenderDemoPlayer(CUIRect MainView)
|
|||
else if(pInfo->m_Speed < 4.0f) DemoPlayer()->SetSpeed(4.0f);
|
||||
else DemoPlayer()->SetSpeed(8.0f);
|
||||
}
|
||||
else if(DecreaseDemoSpeed || Input()->KeyPresses(KEY_MOUSE_WHEEL_DOWN))
|
||||
else if(DecreaseDemoSpeed || Input()->KeyPresses(KEY_MOUSE_WHEEL_DOWN) || Input()->KeyDown(KEY_MINUS) || Input()->KeyDown(KEY_KP_MINUS))
|
||||
{
|
||||
if(pInfo->m_Speed > 4.0f) DemoPlayer()->SetSpeed(4.0f);
|
||||
else if(pInfo->m_Speed > 2.0f) DemoPlayer()->SetSpeed(2.0f);
|
||||
|
|
Loading…
Reference in a new issue