1
0
mirror of https://github.com/ppy/osu.git synced 2024-11-11 09:27:29 +08:00

Remove a couple more overrides

This commit is contained in:
Dean Herbert 2024-01-22 17:00:35 +09:00
parent fd9c7184e4
commit 3dd18c777a
No known key found for this signature in database
3 changed files with 2 additions and 9 deletions

View File

@ -40,8 +40,6 @@ namespace osu.Game.Screens.OnlinePlay.Lounge
{
public override string Title => "Lounge";
protected override bool PlayExitSound => false;
protected override BackgroundScreen CreateBackground() => new LoungeBackgroundScreen
{
SelectedRoom = { BindTarget = SelectedRoom }

View File

@ -44,8 +44,6 @@ namespace osu.Game.Screens.OnlinePlay.Multiplayer
public override string ShortTitle => "room";
protected override bool PlayExitSound => !exitConfirmed;
[Resolved]
private MultiplayerClient client { get; set; }
@ -249,15 +247,13 @@ namespace osu.Game.Screens.OnlinePlay.Multiplayer
[Resolved(canBeNull: true)]
private IDialogOverlay dialogOverlay { get; set; }
private bool exitConfirmed;
public override bool OnExiting(ScreenExitEvent e)
{
// room has not been created yet or we're offline; exit immediately.
if (client.Room == null || !IsConnected)
return base.OnExiting(e);
if (!exitConfirmed && dialogOverlay != null)
if (dialogOverlay != null)
{
if (dialogOverlay.CurrentDialog is ConfirmDialog confirmDialog)
confirmDialog.PerformOkAction();
@ -265,7 +261,6 @@ namespace osu.Game.Screens.OnlinePlay.Multiplayer
{
dialogOverlay.Push(new ConfirmDialog("Are you sure you want to leave this multiplayer match?", () =>
{
exitConfirmed = true;
if (this.IsCurrentScreen())
this.Exit();
}));

View File

@ -13,7 +13,7 @@ namespace osu.Game.Screens.OnlinePlay
public virtual string ShortTitle => Title;
protected override bool PlayExitSound => false;
protected sealed override bool PlayExitSound => false;
[Resolved]
protected IRoomManager? RoomManager { get; private set; }