From 6b712be97d08de140bd6d3b0cb81d8d90412194b Mon Sep 17 00:00:00 2001 From: Dan Balasescu Date: Wed, 23 Mar 2022 10:40:05 +0900 Subject: [PATCH] Remove PopoverButton class --- .../Visual/Multiplayer/TestSceneMatchStartControl.cs | 8 ++++---- .../OnlinePlay/Multiplayer/Match/CountdownButton.cs | 6 +----- 2 files changed, 5 insertions(+), 9 deletions(-) diff --git a/osu.Game.Tests/Visual/Multiplayer/TestSceneMatchStartControl.cs b/osu.Game.Tests/Visual/Multiplayer/TestSceneMatchStartControl.cs index 4e54740a69..b98676e737 100644 --- a/osu.Game.Tests/Visual/Multiplayer/TestSceneMatchStartControl.cs +++ b/osu.Game.Tests/Visual/Multiplayer/TestSceneMatchStartControl.cs @@ -79,7 +79,7 @@ namespace osu.Game.Tests.Visual.Multiplayer ClickButtonWhenEnabled(); AddStep("click the first countdown button", () => { - var popoverButton = this.ChildrenOfType().First(); + var popoverButton = this.ChildrenOfType().Single().ChildrenOfType().First(); InputManager.MoveMouseTo(popoverButton); InputManager.Click(MouseButton.Left); }); @@ -97,7 +97,7 @@ namespace osu.Game.Tests.Visual.Multiplayer ClickButtonWhenEnabled(); AddStep("click the first countdown button", () => { - var popoverButton = this.ChildrenOfType().First(); + var popoverButton = this.ChildrenOfType().Single().ChildrenOfType().First(); InputManager.MoveMouseTo(popoverButton); InputManager.Click(MouseButton.Left); }); @@ -150,7 +150,7 @@ namespace osu.Game.Tests.Visual.Multiplayer ClickButtonWhenEnabled(); AddStep("click the first countdown button", () => { - var popoverButton = this.ChildrenOfType().First(); + var popoverButton = this.ChildrenOfType().Single().ChildrenOfType().First(); InputManager.MoveMouseTo(popoverButton); InputManager.Click(MouseButton.Left); }); @@ -173,7 +173,7 @@ namespace osu.Game.Tests.Visual.Multiplayer ClickButtonWhenEnabled(); AddStep("click the first countdown button", () => { - var popoverButton = this.ChildrenOfType().First(); + var popoverButton = this.ChildrenOfType().Single().ChildrenOfType().First(); InputManager.MoveMouseTo(popoverButton); InputManager.Click(MouseButton.Left); }); diff --git a/osu.Game/Screens/OnlinePlay/Multiplayer/Match/CountdownButton.cs b/osu.Game/Screens/OnlinePlay/Multiplayer/Match/CountdownButton.cs index e598f6670c..e37168bf25 100644 --- a/osu.Game/Screens/OnlinePlay/Multiplayer/Match/CountdownButton.cs +++ b/osu.Game/Screens/OnlinePlay/Multiplayer/Match/CountdownButton.cs @@ -64,7 +64,7 @@ namespace osu.Game.Screens.OnlinePlay.Multiplayer.Match foreach (var duration in available_delays) { - flow.Add(new PopoverButton + flow.Add(new OsuButton { RelativeSizeAxes = Axes.X, Text = $"Start match in {duration.Humanize()}", @@ -79,9 +79,5 @@ namespace osu.Game.Screens.OnlinePlay.Multiplayer.Match return new OsuPopover { Child = flow }; } - - public class PopoverButton : OsuButton - { - } } }