From d7b178ea37225d7618916a534a923dd7aa101588 Mon Sep 17 00:00:00 2001 From: Dean Herbert Date: Thu, 18 Nov 2021 12:36:52 +0900 Subject: [PATCH] Update test scenes which should not handle key repeat --- osu.Game.Tests/Visual/Gameplay/TestSceneKeyBindings.cs | 3 +++ osu.Game.Tests/Visual/Gameplay/TestSceneReplayRecorder.cs | 3 +++ osu.Game.Tests/Visual/Gameplay/TestSceneReplayRecording.cs | 3 +++ osu.Game.Tests/Visual/Gameplay/TestSceneSpectatorPlayback.cs | 3 +++ 4 files changed, 12 insertions(+) diff --git a/osu.Game.Tests/Visual/Gameplay/TestSceneKeyBindings.cs b/osu.Game.Tests/Visual/Gameplay/TestSceneKeyBindings.cs index 883b8a1ae0..70a43fafb5 100644 --- a/osu.Game.Tests/Visual/Gameplay/TestSceneKeyBindings.cs +++ b/osu.Game.Tests/Visual/Gameplay/TestSceneKeyBindings.cs @@ -83,6 +83,9 @@ namespace osu.Game.Tests.Visual.Gameplay public bool OnPressed(KeyBindingPressEvent e) { + if (e.Repeat) + return false; + ReceivedAction = e.Action == TestAction.Down; return true; } diff --git a/osu.Game.Tests/Visual/Gameplay/TestSceneReplayRecorder.cs b/osu.Game.Tests/Visual/Gameplay/TestSceneReplayRecorder.cs index c8040f42f0..159d583fc0 100644 --- a/osu.Game.Tests/Visual/Gameplay/TestSceneReplayRecorder.cs +++ b/osu.Game.Tests/Visual/Gameplay/TestSceneReplayRecorder.cs @@ -231,6 +231,9 @@ namespace osu.Game.Tests.Visual.Gameplay public bool OnPressed(KeyBindingPressEvent e) { + if (e.Repeat) + return false; + box.Colour = Color4.White; return true; } diff --git a/osu.Game.Tests/Visual/Gameplay/TestSceneReplayRecording.cs b/osu.Game.Tests/Visual/Gameplay/TestSceneReplayRecording.cs index 08578168d6..1d4245308d 100644 --- a/osu.Game.Tests/Visual/Gameplay/TestSceneReplayRecording.cs +++ b/osu.Game.Tests/Visual/Gameplay/TestSceneReplayRecording.cs @@ -164,6 +164,9 @@ namespace osu.Game.Tests.Visual.Gameplay public bool OnPressed(KeyBindingPressEvent e) { + if (e.Repeat) + return false; + box.Colour = Color4.White; return true; } diff --git a/osu.Game.Tests/Visual/Gameplay/TestSceneSpectatorPlayback.cs b/osu.Game.Tests/Visual/Gameplay/TestSceneSpectatorPlayback.cs index b4de060578..ef870a32a9 100644 --- a/osu.Game.Tests/Visual/Gameplay/TestSceneSpectatorPlayback.cs +++ b/osu.Game.Tests/Visual/Gameplay/TestSceneSpectatorPlayback.cs @@ -283,6 +283,9 @@ namespace osu.Game.Tests.Visual.Gameplay public bool OnPressed(KeyBindingPressEvent e) { + if (e.Repeat) + return false; + box.Colour = Color4.White; return true; }