mirror of
https://github.com/ppy/osu.git
synced 2024-11-11 10:33:30 +08:00
Merge branch 'master' into realm-cleanup-overheads-fix
This commit is contained in:
commit
393d101bc2
@ -938,6 +938,35 @@ namespace osu.Game.Tests.Visual.Navigation
|
||||
AddUntilStep("touch device mod still active", () => Game.SelectedMods.Value, () => Has.One.InstanceOf<ModTouchDevice>());
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void TestExitSongSelectAndImmediatelyClickLogo()
|
||||
{
|
||||
Screens.Select.SongSelect songSelect = null;
|
||||
PushAndConfirm(() => songSelect = new TestPlaySongSelect());
|
||||
AddUntilStep("wait for song select", () => songSelect.BeatmapSetsLoaded);
|
||||
|
||||
AddStep("import beatmap", () => BeatmapImportHelper.LoadQuickOszIntoOsu(Game).WaitSafely());
|
||||
|
||||
AddUntilStep("wait for selected", () => !Game.Beatmap.IsDefault);
|
||||
|
||||
AddStep("press escape and then click logo immediately", () =>
|
||||
{
|
||||
InputManager.Key(Key.Escape);
|
||||
clickLogoWhenNotCurrent();
|
||||
});
|
||||
|
||||
void clickLogoWhenNotCurrent()
|
||||
{
|
||||
if (songSelect.IsCurrentScreen())
|
||||
Scheduler.AddOnce(clickLogoWhenNotCurrent);
|
||||
else
|
||||
{
|
||||
InputManager.MoveMouseTo(Game.ChildrenOfType<OsuLogo>().Single());
|
||||
InputManager.Click(MouseButton.Left);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private Func<Player> playToResults()
|
||||
{
|
||||
var player = playToCompletion();
|
||||
|
@ -660,7 +660,8 @@ namespace osu.Game.Screens.Select
|
||||
|
||||
logo.Action = () =>
|
||||
{
|
||||
FinaliseSelection();
|
||||
if (this.IsCurrentScreen())
|
||||
FinaliseSelection();
|
||||
return false;
|
||||
};
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user