mirror of
https://github.com/ppy/osu.git
synced 2024-12-15 06:52:56 +08:00
Push to main multiplayer screen instead
This commit is contained in:
parent
22f4e9012c
commit
3c07defa1a
@ -20,6 +20,7 @@ using osu.Game.Screens.Multi.Components;
|
|||||||
using osu.Game.Screens.Multi.Match.Components;
|
using osu.Game.Screens.Multi.Match.Components;
|
||||||
using osu.Game.Screens.Multi.Play;
|
using osu.Game.Screens.Multi.Play;
|
||||||
using osu.Game.Screens.Multi.Ranking;
|
using osu.Game.Screens.Multi.Ranking;
|
||||||
|
using osu.Game.Screens.Play;
|
||||||
using osu.Game.Screens.Select;
|
using osu.Game.Screens.Select;
|
||||||
using Footer = osu.Game.Screens.Multi.Match.Components.Footer;
|
using Footer = osu.Game.Screens.Multi.Match.Components.Footer;
|
||||||
|
|
||||||
@ -260,10 +261,10 @@ namespace osu.Game.Screens.Multi.Match
|
|||||||
{
|
{
|
||||||
default:
|
default:
|
||||||
case GameTypeTimeshift _:
|
case GameTypeTimeshift _:
|
||||||
multiplayer?.Start(() => new TimeshiftPlayer(SelectedItem.Value)
|
multiplayer?.Push(new PlayerLoader(() => new TimeshiftPlayer(SelectedItem.Value)
|
||||||
{
|
{
|
||||||
Exited = () => leaderboardChatDisplay.RefreshScores()
|
Exited = () => leaderboardChatDisplay.RefreshScores()
|
||||||
});
|
}));
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -271,8 +272,7 @@ namespace osu.Game.Screens.Multi.Match
|
|||||||
private void showBeatmapResults()
|
private void showBeatmapResults()
|
||||||
{
|
{
|
||||||
Debug.Assert(roomId.Value != null);
|
Debug.Assert(roomId.Value != null);
|
||||||
|
multiplayer?.Push(new TimeshiftResultsScreen(null, roomId.Value.Value, SelectedItem.Value, false));
|
||||||
this.Push(new TimeshiftResultsScreen(null, roomId.Value.Value, SelectedItem.Value, false));
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,7 +1,6 @@
|
|||||||
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
|
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
|
||||||
// See the LICENCE file in the repository root for full licence text.
|
// See the LICENCE file in the repository root for full licence text.
|
||||||
|
|
||||||
using System;
|
|
||||||
using osu.Framework.Allocation;
|
using osu.Framework.Allocation;
|
||||||
using osu.Framework.Bindables;
|
using osu.Framework.Bindables;
|
||||||
using osu.Framework.Extensions.Color4Extensions;
|
using osu.Framework.Extensions.Color4Extensions;
|
||||||
@ -24,7 +23,6 @@ using osu.Game.Screens.Multi.Lounge;
|
|||||||
using osu.Game.Screens.Multi.Lounge.Components;
|
using osu.Game.Screens.Multi.Lounge.Components;
|
||||||
using osu.Game.Screens.Multi.Match;
|
using osu.Game.Screens.Multi.Match;
|
||||||
using osu.Game.Screens.Multi.Match.Components;
|
using osu.Game.Screens.Multi.Match.Components;
|
||||||
using osu.Game.Screens.Play;
|
|
||||||
using osuTK;
|
using osuTK;
|
||||||
|
|
||||||
namespace osu.Game.Screens.Multi
|
namespace osu.Game.Screens.Multi
|
||||||
@ -197,18 +195,6 @@ namespace osu.Game.Screens.Multi
|
|||||||
Logger.Log($"Polling adjusted (listing: {roomManager.TimeBetweenListingPolls}, selection: {roomManager.TimeBetweenSelectionPolls})");
|
Logger.Log($"Polling adjusted (listing: {roomManager.TimeBetweenListingPolls}, selection: {roomManager.TimeBetweenSelectionPolls})");
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Push a <see cref="Player"/> to the main screen stack to begin gameplay.
|
|
||||||
/// Generally called from a <see cref="MatchSubScreen"/> via DI resolution.
|
|
||||||
/// </summary>
|
|
||||||
public void Start(Func<Player> player)
|
|
||||||
{
|
|
||||||
if (!this.IsCurrentScreen())
|
|
||||||
return;
|
|
||||||
|
|
||||||
this.Push(new PlayerLoader(player));
|
|
||||||
}
|
|
||||||
|
|
||||||
public void APIStateChanged(IAPIProvider api, APIState state)
|
public void APIStateChanged(IAPIProvider api, APIState state)
|
||||||
{
|
{
|
||||||
if (state != APIState.Online)
|
if (state != APIState.Online)
|
||||||
|
Loading…
Reference in New Issue
Block a user