mirror of
https://github.com/osukey/osukey.git
synced 2025-08-05 15:44:04 +09:00
Allow right-clicking to rewind on random button
This commit is contained in:
@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user