mirror of
https://github.com/ppy/osu.git
synced 2025-01-28 02:02:53 +08:00
Remove second overload of Close (makes the call structure hard to follow / invoke correctly)
This commit is contained in:
parent
2ee634d173
commit
72562070bc
@ -114,7 +114,7 @@ namespace osu.Game.Overlays.Notifications
|
||||
closeButton = new CloseButton
|
||||
{
|
||||
Alpha = 0,
|
||||
Action = Close,
|
||||
Action = () => Close(),
|
||||
Anchor = Anchor.CentreRight,
|
||||
Origin = Anchor.CentreRight,
|
||||
Margin = new MarginPadding
|
||||
@ -167,9 +167,7 @@ namespace osu.Game.Overlays.Notifications
|
||||
|
||||
public bool WasClosed;
|
||||
|
||||
public virtual void Close() => Close(true);
|
||||
|
||||
public virtual void Close(bool playSound)
|
||||
public virtual void Close(bool playSound = true)
|
||||
{
|
||||
if (WasClosed) return;
|
||||
|
||||
|
@ -150,12 +150,12 @@ namespace osu.Game.Overlays.Notifications
|
||||
colourCancelled = colours.Red;
|
||||
}
|
||||
|
||||
public override void Close()
|
||||
public override void Close(bool playSound = true)
|
||||
{
|
||||
switch (State)
|
||||
{
|
||||
case ProgressNotificationState.Cancelled:
|
||||
base.Close();
|
||||
base.Close(playSound);
|
||||
break;
|
||||
|
||||
case ProgressNotificationState.Active:
|
||||
|
Loading…
Reference in New Issue
Block a user