1
0
mirror of https://github.com/ppy/osu.git synced 2024-12-14 12:33:01 +08:00

Merge branch 'master' into realm-cleanup-overheads-fix

This commit is contained in:
Bartłomiej Dach 2024-01-09 13:35:22 +01:00
commit 393d101bc2
No known key found for this signature in database
2 changed files with 31 additions and 1 deletions

View File

@ -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();

View File

@ -660,7 +660,8 @@ namespace osu.Game.Screens.Select
logo.Action = () =>
{
FinaliseSelection();
if (this.IsCurrentScreen())
FinaliseSelection();
return false;
};
}