mirror of
https://github.com/ddnet/ddnet.git
synced 2024-11-09 09:38:19 +00:00
speedup demo with mouse scroll only if menu is active
This commit is contained in:
parent
028bd148f3
commit
7c62b457b7
|
@ -175,12 +175,12 @@ void CMenus::RenderDemoPlayer(CUIRect MainView)
|
|||
// increase/decrease speed
|
||||
if(!Input()->ModifierIsPressed() && !Input()->ShiftIsPressed() && !Input()->AltIsPressed())
|
||||
{
|
||||
if(Input()->KeyPress(KEY_MOUSE_WHEEL_UP) || Input()->KeyPress(KEY_UP))
|
||||
if(Input()->KeyPress(KEY_UP) || (m_MenuActive && Input()->KeyPress(KEY_MOUSE_WHEEL_UP)))
|
||||
{
|
||||
DemoPlayer()->AdjustSpeedIndex(+1);
|
||||
UpdateLastSpeedChange();
|
||||
}
|
||||
else if(Input()->KeyPress(KEY_MOUSE_WHEEL_DOWN) || Input()->KeyPress(KEY_DOWN))
|
||||
else if(Input()->KeyPress(KEY_DOWN) || (m_MenuActive && Input()->KeyPress(KEY_MOUSE_WHEEL_DOWN)))
|
||||
{
|
||||
DemoPlayer()->AdjustSpeedIndex(-1);
|
||||
UpdateLastSpeedChange();
|
||||
|
|
Loading…
Reference in a new issue