From e5fab9cfbe2cf20225dbf9cfe94f5a23d8cff711 Mon Sep 17 00:00:00 2001 From: OliBomby Date: Fri, 16 Aug 2024 11:55:07 +0200 Subject: [PATCH 1/2] Remove select action to end placement --- osu.Game/Rulesets/Edit/PlacementBlueprint.cs | 4 ---- 1 file changed, 4 deletions(-) diff --git a/osu.Game/Rulesets/Edit/PlacementBlueprint.cs b/osu.Game/Rulesets/Edit/PlacementBlueprint.cs index 60b979da59..a50a7f4169 100644 --- a/osu.Game/Rulesets/Edit/PlacementBlueprint.cs +++ b/osu.Game/Rulesets/Edit/PlacementBlueprint.cs @@ -125,10 +125,6 @@ namespace osu.Game.Rulesets.Edit switch (e.Action) { - case GlobalAction.Select: - EndPlacement(true); - return true; - case GlobalAction.Back: EndPlacement(false); return true; From 3d4bc8a2cc5da3c8985e9d0ef7330ee21e49f311 Mon Sep 17 00:00:00 2001 From: OliBomby Date: Fri, 16 Aug 2024 15:04:38 +0200 Subject: [PATCH 2/2] fix tests --- .../Editing/TestScenePlacementBlueprint.cs | 32 +------------------ 1 file changed, 1 insertion(+), 31 deletions(-) diff --git a/osu.Game.Tests/Visual/Editing/TestScenePlacementBlueprint.cs b/osu.Game.Tests/Visual/Editing/TestScenePlacementBlueprint.cs index 8173536ba4..fe74e1b346 100644 --- a/osu.Game.Tests/Visual/Editing/TestScenePlacementBlueprint.cs +++ b/osu.Game.Tests/Visual/Editing/TestScenePlacementBlueprint.cs @@ -96,32 +96,6 @@ namespace osu.Game.Tests.Visual.Editing AddAssert("slider placed", () => EditorBeatmap.HitObjects.Count, () => Is.EqualTo(1)); } - [Test] - public void TestCommitPlacementViaGlobalAction() - { - Playfield playfield = null!; - - AddStep("select slider placement tool", () => InputManager.Key(Key.Number3)); - AddStep("move mouse to top left of playfield", () => - { - playfield = this.ChildrenOfType().Single(); - var location = (3 * playfield.ScreenSpaceDrawQuad.TopLeft + playfield.ScreenSpaceDrawQuad.BottomRight) / 4; - InputManager.MoveMouseTo(location); - }); - AddStep("begin placement", () => InputManager.Click(MouseButton.Left)); - AddStep("move mouse to bottom right of playfield", () => - { - var location = (playfield.ScreenSpaceDrawQuad.TopLeft + 3 * playfield.ScreenSpaceDrawQuad.BottomRight) / 4; - InputManager.MoveMouseTo(location); - }); - AddStep("confirm via global action", () => - { - globalActionContainer.TriggerPressed(GlobalAction.Select); - globalActionContainer.TriggerReleased(GlobalAction.Select); - }); - AddAssert("slider placed", () => EditorBeatmap.HitObjects.Count, () => Is.EqualTo(1)); - } - [Test] public void TestAbortPlacementViaGlobalAction() { @@ -272,11 +246,7 @@ namespace osu.Game.Tests.Visual.Editing var location = (playfield.ScreenSpaceDrawQuad.TopLeft + 3 * playfield.ScreenSpaceDrawQuad.BottomRight) / 4; InputManager.MoveMouseTo(location); }); - AddStep("confirm via global action", () => - { - globalActionContainer.TriggerPressed(GlobalAction.Select); - globalActionContainer.TriggerReleased(GlobalAction.Select); - }); + AddStep("confirm via right click", () => InputManager.Click(MouseButton.Right)); AddAssert("slider placed", () => EditorBeatmap.HitObjects.Count, () => Is.EqualTo(1)); AddAssert("slider samples have drum bank", () => EditorBeatmap.HitObjects[0].Samples.All(s => s.Bank == HitSampleInfo.BANK_DRUM));