mirror of
https://github.com/ppy/osu.git
synced 2025-01-28 18:12:56 +08:00
Always create realtime-specific player elements regardless of token
This commit is contained in:
parent
21a4e6a3f9
commit
76a7aabfe8
@ -4,7 +4,6 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.Diagnostics;
|
using System.Diagnostics;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
using JetBrains.Annotations;
|
|
||||||
using osu.Framework.Allocation;
|
using osu.Framework.Allocation;
|
||||||
using osu.Framework.Bindables;
|
using osu.Framework.Bindables;
|
||||||
using osu.Framework.Logging;
|
using osu.Framework.Logging;
|
||||||
@ -35,7 +34,6 @@ namespace osu.Game.Screens.Multi.RealtimeMultiplayer
|
|||||||
|
|
||||||
private readonly TaskCompletionSource<bool> resultsReady = new TaskCompletionSource<bool>();
|
private readonly TaskCompletionSource<bool> resultsReady = new TaskCompletionSource<bool>();
|
||||||
|
|
||||||
[CanBeNull]
|
|
||||||
private MultiplayerGameplayLeaderboard leaderboard;
|
private MultiplayerGameplayLeaderboard leaderboard;
|
||||||
|
|
||||||
private readonly int[] userIds;
|
private readonly int[] userIds;
|
||||||
@ -61,6 +59,11 @@ namespace osu.Game.Screens.Multi.RealtimeMultiplayer
|
|||||||
[BackgroundDependencyLoader]
|
[BackgroundDependencyLoader]
|
||||||
private void load()
|
private void load()
|
||||||
{
|
{
|
||||||
|
// todo: this should be implemented via a custom HUD implementation, and correctly masked to the main content area.
|
||||||
|
LoadComponentAsync(leaderboard = new MultiplayerGameplayLeaderboard(ScoreProcessor, userIds), HUDOverlay.Add);
|
||||||
|
|
||||||
|
HUDOverlay.Add(loadingDisplay = new LoadingLayer(DrawableRuleset) { Depth = float.MaxValue });
|
||||||
|
|
||||||
if (Token == null)
|
if (Token == null)
|
||||||
return; // Todo: Somehow handle token retrieval failure.
|
return; // Todo: Somehow handle token retrieval failure.
|
||||||
|
|
||||||
@ -84,11 +87,6 @@ namespace osu.Game.Screens.Multi.RealtimeMultiplayer
|
|||||||
}, true);
|
}, true);
|
||||||
|
|
||||||
Debug.Assert(client.Room != null);
|
Debug.Assert(client.Room != null);
|
||||||
|
|
||||||
// todo: this should be implemented via a custom HUD implementation, and correctly masked to the main content area.
|
|
||||||
LoadComponentAsync(leaderboard = new MultiplayerGameplayLeaderboard(ScoreProcessor, userIds), HUDOverlay.Add);
|
|
||||||
|
|
||||||
HUDOverlay.Add(loadingDisplay = new LoadingLayer(DrawableRuleset) { Depth = float.MaxValue });
|
|
||||||
}
|
}
|
||||||
|
|
||||||
protected override void StartGameplay()
|
protected override void StartGameplay()
|
||||||
@ -115,9 +113,6 @@ namespace osu.Game.Screens.Multi.RealtimeMultiplayer
|
|||||||
|
|
||||||
private void adjustLeaderboardPosition()
|
private void adjustLeaderboardPosition()
|
||||||
{
|
{
|
||||||
if (leaderboard == null)
|
|
||||||
return;
|
|
||||||
|
|
||||||
const float padding = 44; // enough margin to avoid the hit error display.
|
const float padding = 44; // enough margin to avoid the hit error display.
|
||||||
|
|
||||||
leaderboard.Position = new Vector2(
|
leaderboard.Position = new Vector2(
|
||||||
|
Loading…
Reference in New Issue
Block a user