mirror of
https://github.com/ddnet/ddnet.git
synced 2024-11-09 17:48:19 +00:00
Merge pull request #8819 from Anime-pdf/master
speedup demo with mouse scroll only if menu is active
This commit is contained in:
commit
b30b493ab8
|
@ -175,12 +175,12 @@ void CMenus::RenderDemoPlayer(CUIRect MainView)
|
||||||
// increase/decrease speed
|
// increase/decrease speed
|
||||||
if(!Input()->ModifierIsPressed() && !Input()->ShiftIsPressed() && !Input()->AltIsPressed())
|
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);
|
DemoPlayer()->AdjustSpeedIndex(+1);
|
||||||
UpdateLastSpeedChange();
|
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);
|
DemoPlayer()->AdjustSpeedIndex(-1);
|
||||||
UpdateLastSpeedChange();
|
UpdateLastSpeedChange();
|
||||||
|
|
Loading…
Reference in a new issue