Allow right-clicking to rewind on random button

This commit is contained in:
Salman Ahmed
2022-04-29 10:12:20 +03:00
parent a9d67d3e92
commit 856ca96b66
2 changed files with 33 additions and 4 deletions

View File

@ -4,6 +4,7 @@
using NUnit.Framework;
using osu.Framework.Graphics;
using osu.Game.Screens.Select;
using osuTK;
using osuTK.Input;
namespace osu.Game.Tests.Visual.SongSelect
@ -36,6 +37,8 @@ namespace osu.Game.Tests.Visual.SongSelect
PreviousRandom = () => previousRandomCalled = true,
}, null);
footer.AddButton(new FooterButtonOptions(), null);
InputManager.MoveMouseTo(Vector2.Zero);
});
[Test]
@ -70,7 +73,7 @@ namespace osu.Game.Tests.Visual.SongSelect
}
[Test]
public void TestFooterRewindViaMouse()
public void TestFooterRewindViaShiftMouseLeft()
{
AddStep("shift + click button", () =>
{
@ -81,5 +84,16 @@ namespace osu.Game.Tests.Visual.SongSelect
});
AddAssert("previous random invoked", () => previousRandomCalled && !nextRandomCalled);
}
[Test]
public void TestFooterRewindViaMouseRight()
{
AddStep("right click button", () =>
{
InputManager.MoveMouseTo(randomButton);
InputManager.Click(MouseButton.Right);
});
AddAssert("previous random invoked", () => previousRandomCalled && !nextRandomCalled);
}
}
}