mirror of
https://github.com/ppy/osu.git
synced 2025-03-06 03:42:55 +08:00
Merge branch 'master' into changelog-refactor
This commit is contained in:
commit
1b7c72f03b
@ -20,14 +20,17 @@ using osu.Game.Rulesets.Osu.Scoring;
|
||||
using osu.Game.Rulesets.Scoring;
|
||||
using osu.Game.Scoring;
|
||||
using osu.Game.Screens.Play.HUD;
|
||||
using osu.Game.Tests.Visual.Multiplayer;
|
||||
using osu.Game.Tests.Visual.Online;
|
||||
|
||||
namespace osu.Game.Tests.Visual.Gameplay
|
||||
{
|
||||
public class TestSceneMultiplayerGameplayLeaderboard : OsuTestScene
|
||||
public class TestSceneMultiplayerGameplayLeaderboard : MultiplayerTestScene
|
||||
{
|
||||
private const int users = 16;
|
||||
|
||||
[Cached(typeof(SpectatorStreamingClient))]
|
||||
private TestMultiplayerStreaming streamingClient = new TestMultiplayerStreaming(16);
|
||||
private TestMultiplayerStreaming streamingClient = new TestMultiplayerStreaming(users);
|
||||
|
||||
[Cached(typeof(UserLookupCache))]
|
||||
private UserLookupCache lookupCache = new TestSceneCurrentlyPlayingDisplay.TestUserLookupCache();
|
||||
@ -47,10 +50,12 @@ namespace osu.Game.Tests.Visual.Gameplay
|
||||
}
|
||||
|
||||
[SetUpSteps]
|
||||
public void SetUpSteps()
|
||||
public override void SetUpSteps()
|
||||
{
|
||||
AddStep("create leaderboard", () =>
|
||||
{
|
||||
leaderboard?.Expire();
|
||||
|
||||
OsuScoreProcessor scoreProcessor;
|
||||
Beatmap.Value = CreateWorkingBeatmap(Ruleset.Value);
|
||||
|
||||
@ -58,6 +63,9 @@ namespace osu.Game.Tests.Visual.Gameplay
|
||||
|
||||
streamingClient.Start(Beatmap.Value.BeatmapInfo.OnlineBeatmapID ?? 0);
|
||||
|
||||
Client.PlayingUsers.Clear();
|
||||
Client.PlayingUsers.AddRange(streamingClient.PlayingUsers);
|
||||
|
||||
Children = new Drawable[]
|
||||
{
|
||||
scoreProcessor = new OsuScoreProcessor(),
|
||||
@ -81,6 +89,12 @@ namespace osu.Game.Tests.Visual.Gameplay
|
||||
AddRepeatStep("update state", () => streamingClient.RandomlyUpdateState(), 100);
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void TestUserQuit()
|
||||
{
|
||||
AddRepeatStep("mark user quit", () => Client.PlayingUsers.RemoveAt(0), users);
|
||||
}
|
||||
|
||||
public class TestMultiplayerStreaming : SpectatorStreamingClient
|
||||
{
|
||||
public new BindableList<int> PlayingUsers => (BindableList<int>)base.PlayingUsers;
|
||||
|
@ -6,7 +6,7 @@ using osu.Framework.Allocation;
|
||||
using osu.Game.Beatmaps;
|
||||
using osu.Game.Online.Rooms;
|
||||
using osu.Game.Rulesets;
|
||||
using osu.Game.Screens.Multi;
|
||||
using osu.Game.Screens.OnlinePlay;
|
||||
using osu.Game.Users;
|
||||
|
||||
namespace osu.Game.Tests.Visual.Multiplayer
|
||||
|
@ -4,7 +4,7 @@
|
||||
using System;
|
||||
using osu.Framework.Bindables;
|
||||
using osu.Game.Online.Rooms;
|
||||
using osu.Game.Screens.Multi;
|
||||
using osu.Game.Screens.OnlinePlay;
|
||||
|
||||
namespace osu.Game.Tests.Visual.Multiplayer
|
||||
{
|
||||
|
@ -18,7 +18,7 @@ using osu.Game.Overlays;
|
||||
using osu.Game.Rulesets;
|
||||
using osu.Game.Rulesets.Osu;
|
||||
using osu.Game.Rulesets.Osu.Mods;
|
||||
using osu.Game.Screens.Multi;
|
||||
using osu.Game.Screens.OnlinePlay;
|
||||
using osu.Game.Tests.Beatmaps;
|
||||
using osuTK;
|
||||
using osuTK.Input;
|
||||
|
@ -5,7 +5,7 @@ using System;
|
||||
using NUnit.Framework;
|
||||
using osu.Framework.Graphics;
|
||||
using osu.Game.Online.Rooms.RoomStatuses;
|
||||
using osu.Game.Screens.Multi.Lounge.Components;
|
||||
using osu.Game.Screens.OnlinePlay.Lounge.Components;
|
||||
using osu.Game.Users;
|
||||
|
||||
namespace osu.Game.Tests.Visual.Multiplayer
|
||||
|
@ -9,7 +9,7 @@ using osu.Game.Graphics;
|
||||
using osu.Game.Online.Rooms;
|
||||
using osu.Game.Rulesets.Catch;
|
||||
using osu.Game.Rulesets.Osu;
|
||||
using osu.Game.Screens.Multi.Lounge.Components;
|
||||
using osu.Game.Screens.OnlinePlay.Lounge.Components;
|
||||
using osuTK.Graphics;
|
||||
using osuTK.Input;
|
||||
|
||||
|
@ -9,7 +9,7 @@ using osu.Game.Online.Rooms;
|
||||
using osu.Game.Rulesets;
|
||||
using osu.Game.Rulesets.Osu;
|
||||
using osu.Game.Rulesets.Osu.Mods;
|
||||
using osu.Game.Screens.Multi.Components;
|
||||
using osu.Game.Screens.OnlinePlay.Components;
|
||||
using osu.Game.Tests.Beatmaps;
|
||||
using osuTK;
|
||||
|
||||
|
@ -6,7 +6,7 @@ using osu.Game.Beatmaps;
|
||||
using osu.Game.Online.Rooms;
|
||||
using osu.Game.Rulesets.Osu;
|
||||
using osu.Game.Rulesets.Osu.Mods;
|
||||
using osu.Game.Screens.Multi.Match.Components;
|
||||
using osu.Game.Screens.OnlinePlay.Match.Components;
|
||||
using osu.Game.Users;
|
||||
|
||||
namespace osu.Game.Tests.Visual.Multiplayer
|
||||
|
@ -7,7 +7,7 @@ using NUnit.Framework;
|
||||
using osu.Framework.Allocation;
|
||||
using osu.Framework.Graphics;
|
||||
using osu.Game.Online.API;
|
||||
using osu.Game.Screens.Multi.Match.Components;
|
||||
using osu.Game.Screens.OnlinePlay.Match.Components;
|
||||
using osu.Game.Users;
|
||||
using osuTK;
|
||||
|
||||
|
@ -18,7 +18,7 @@ using osu.Game.Rulesets;
|
||||
using osu.Game.Rulesets.Mods;
|
||||
using osu.Game.Rulesets.Osu;
|
||||
using osu.Game.Rulesets.Osu.Mods;
|
||||
using osu.Game.Screens.Multi.Components;
|
||||
using osu.Game.Screens.OnlinePlay.Components;
|
||||
using osu.Game.Screens.Select;
|
||||
|
||||
namespace osu.Game.Tests.Visual.Multiplayer
|
||||
|
@ -5,7 +5,7 @@ using NUnit.Framework;
|
||||
using osu.Framework.Graphics;
|
||||
using osu.Framework.Screens;
|
||||
using osu.Game.Screens;
|
||||
using osu.Game.Screens.Multi;
|
||||
using osu.Game.Screens.OnlinePlay;
|
||||
|
||||
namespace osu.Game.Tests.Visual.Multiplayer
|
||||
{
|
||||
@ -18,7 +18,7 @@ namespace osu.Game.Tests.Visual.Multiplayer
|
||||
|
||||
OsuScreenStack screenStack = new OsuScreenStack { RelativeSizeAxes = Axes.Both };
|
||||
|
||||
screenStack.Push(new TestMultiplayerSubScreen(index));
|
||||
screenStack.Push(new TestOnlinePlaySubScreen(index));
|
||||
|
||||
Children = new Drawable[]
|
||||
{
|
||||
@ -26,16 +26,16 @@ namespace osu.Game.Tests.Visual.Multiplayer
|
||||
new Header("Multiplayer", screenStack)
|
||||
};
|
||||
|
||||
AddStep("push multi screen", () => screenStack.CurrentScreen.Push(new TestMultiplayerSubScreen(++index)));
|
||||
AddStep("push multi screen", () => screenStack.CurrentScreen.Push(new TestOnlinePlaySubScreen(++index)));
|
||||
}
|
||||
|
||||
private class TestMultiplayerSubScreen : OsuScreen, IMultiplayerSubScreen
|
||||
private class TestOnlinePlaySubScreen : OsuScreen, IOnlinePlaySubScreen
|
||||
{
|
||||
private readonly int index;
|
||||
|
||||
public string ShortTitle => $"Screen {index}";
|
||||
|
||||
public TestMultiplayerSubScreen(int index)
|
||||
public TestOnlinePlaySubScreen(int index)
|
||||
{
|
||||
this.index = index;
|
||||
}
|
||||
|
@ -2,7 +2,7 @@
|
||||
// See the LICENCE file in the repository root for full licence text.
|
||||
|
||||
using NUnit.Framework;
|
||||
using osu.Game.Screens.Multi.Components;
|
||||
using osu.Game.Screens.OnlinePlay.Components;
|
||||
using osu.Game.Users;
|
||||
|
||||
namespace osu.Game.Tests.Visual.Multiplayer
|
||||
@ -39,7 +39,7 @@ namespace osu.Game.Tests.Visual.Multiplayer
|
||||
AddAssert("room has 1 user", () => Client.Room?.Users.Count == 1);
|
||||
}
|
||||
|
||||
private class TestMultiplayer : Screens.Multi.Multiplayer.Multiplayer
|
||||
private class TestMultiplayer : Screens.OnlinePlay.Multiplayer.Multiplayer
|
||||
{
|
||||
protected override RoomManager CreateRoomManager() => new TestMultiplayerRoomManager();
|
||||
}
|
||||
|
@ -7,8 +7,8 @@ using osu.Framework.Screens;
|
||||
using osu.Framework.Testing;
|
||||
using osu.Game.Online.Rooms;
|
||||
using osu.Game.Rulesets.Osu;
|
||||
using osu.Game.Screens.Multi.Multiplayer;
|
||||
using osu.Game.Screens.Multi.Multiplayer.Match;
|
||||
using osu.Game.Screens.OnlinePlay.Multiplayer;
|
||||
using osu.Game.Screens.OnlinePlay.Multiplayer.Match;
|
||||
using osu.Game.Tests.Beatmaps;
|
||||
using osuTK.Input;
|
||||
|
||||
|
@ -8,7 +8,7 @@ using osu.Framework.Graphics.Sprites;
|
||||
using osu.Framework.Testing;
|
||||
using osu.Framework.Utils;
|
||||
using osu.Game.Online.Multiplayer;
|
||||
using osu.Game.Screens.Multi.Multiplayer.Participants;
|
||||
using osu.Game.Screens.OnlinePlay.Multiplayer.Participants;
|
||||
using osu.Game.Users;
|
||||
using osuTK;
|
||||
|
||||
|
@ -12,7 +12,7 @@ using osu.Game.Beatmaps;
|
||||
using osu.Game.Online.Multiplayer;
|
||||
using osu.Game.Online.Rooms;
|
||||
using osu.Game.Rulesets;
|
||||
using osu.Game.Screens.Multi.Multiplayer.Match;
|
||||
using osu.Game.Screens.OnlinePlay.Multiplayer.Match;
|
||||
using osu.Game.Tests.Resources;
|
||||
using osu.Game.Users;
|
||||
using osuTK;
|
||||
|
@ -6,7 +6,7 @@ using osu.Framework.Graphics;
|
||||
using osu.Framework.Graphics.Containers;
|
||||
using osu.Game.Online.Rooms;
|
||||
using osu.Game.Online.Rooms.RoomStatuses;
|
||||
using osu.Game.Screens.Multi.Lounge.Components;
|
||||
using osu.Game.Screens.OnlinePlay.Lounge.Components;
|
||||
|
||||
namespace osu.Game.Tests.Visual.Multiplayer
|
||||
{
|
||||
|
@ -107,14 +107,14 @@ namespace osu.Game.Tests.Visual.Navigation
|
||||
[Test]
|
||||
public void TestExitMultiWithEscape()
|
||||
{
|
||||
PushAndConfirm(() => new Screens.Multi.Playlists.Playlists());
|
||||
PushAndConfirm(() => new Screens.OnlinePlay.Playlists.Playlists());
|
||||
exitViaEscapeAndConfirm();
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void TestExitMultiWithBackButton()
|
||||
{
|
||||
PushAndConfirm(() => new Screens.Multi.Playlists.Playlists());
|
||||
PushAndConfirm(() => new Screens.OnlinePlay.Playlists.Playlists());
|
||||
exitViaBackButtonAndConfirm();
|
||||
}
|
||||
|
||||
|
@ -2,7 +2,7 @@
|
||||
// See the LICENCE file in the repository root for full licence text.
|
||||
|
||||
using osu.Framework.Graphics;
|
||||
using osu.Game.Screens.Multi.Lounge.Components;
|
||||
using osu.Game.Screens.OnlinePlay.Lounge.Components;
|
||||
|
||||
namespace osu.Game.Tests.Visual.Playlists
|
||||
{
|
||||
|
@ -8,9 +8,9 @@ using osu.Framework.Graphics;
|
||||
using osu.Framework.Screens;
|
||||
using osu.Framework.Testing;
|
||||
using osu.Game.Graphics.Containers;
|
||||
using osu.Game.Screens.Multi.Lounge;
|
||||
using osu.Game.Screens.Multi.Lounge.Components;
|
||||
using osu.Game.Screens.Multi.Playlists;
|
||||
using osu.Game.Screens.OnlinePlay.Lounge;
|
||||
using osu.Game.Screens.OnlinePlay.Lounge.Components;
|
||||
using osu.Game.Screens.OnlinePlay.Playlists;
|
||||
using osu.Game.Tests.Visual.Multiplayer;
|
||||
|
||||
namespace osu.Game.Tests.Visual.Playlists
|
||||
|
@ -10,8 +10,8 @@ using osu.Framework.Graphics.Containers;
|
||||
using osu.Game.Graphics.Sprites;
|
||||
using osu.Game.Graphics.UserInterface;
|
||||
using osu.Game.Online.Rooms;
|
||||
using osu.Game.Screens.Multi;
|
||||
using osu.Game.Screens.Multi.Playlists;
|
||||
using osu.Game.Screens.OnlinePlay;
|
||||
using osu.Game.Screens.OnlinePlay.Playlists;
|
||||
|
||||
namespace osu.Game.Tests.Visual.Playlists
|
||||
{
|
||||
|
@ -3,7 +3,7 @@
|
||||
|
||||
using NUnit.Framework;
|
||||
using osu.Framework.Graphics;
|
||||
using osu.Game.Screens.Multi.Components;
|
||||
using osu.Game.Screens.OnlinePlay.Components;
|
||||
using osu.Game.Users;
|
||||
|
||||
namespace osu.Game.Tests.Visual.Playlists
|
||||
|
@ -19,7 +19,7 @@ using osu.Game.Online.Rooms;
|
||||
using osu.Game.Rulesets.Osu;
|
||||
using osu.Game.Rulesets.Scoring;
|
||||
using osu.Game.Scoring;
|
||||
using osu.Game.Screens.Multi.Playlists;
|
||||
using osu.Game.Screens.OnlinePlay.Playlists;
|
||||
using osu.Game.Screens.Ranking;
|
||||
using osu.Game.Tests.Beatmaps;
|
||||
using osu.Game.Users;
|
||||
|
@ -15,9 +15,9 @@ using osu.Game.Graphics.UserInterface;
|
||||
using osu.Game.Online.Rooms;
|
||||
using osu.Game.Rulesets;
|
||||
using osu.Game.Rulesets.Osu;
|
||||
using osu.Game.Screens.Multi;
|
||||
using osu.Game.Screens.Multi.Match.Components;
|
||||
using osu.Game.Screens.Multi.Playlists;
|
||||
using osu.Game.Screens.OnlinePlay;
|
||||
using osu.Game.Screens.OnlinePlay.Match.Components;
|
||||
using osu.Game.Screens.OnlinePlay.Playlists;
|
||||
using osu.Game.Tests.Beatmaps;
|
||||
using osu.Game.Users;
|
||||
using osuTK.Input;
|
||||
|
@ -17,7 +17,7 @@ namespace osu.Game.Tests.Visual.Playlists
|
||||
|
||||
public TestScenePlaylistsScreen()
|
||||
{
|
||||
var multi = new Screens.Multi.Playlists.Playlists();
|
||||
var multi = new Screens.OnlinePlay.Playlists.Playlists();
|
||||
|
||||
AddStep("show", () => LoadScreen(multi));
|
||||
AddUntilStep("wait for loaded", () => multi.IsLoaded);
|
||||
|
@ -78,7 +78,7 @@ namespace osu.Game.Online.Leaderboards
|
||||
|
||||
statisticsLabels = GetStatistics(score).Select(s => new ScoreComponentLabel(s)).ToList();
|
||||
|
||||
DrawableAvatar innerAvatar;
|
||||
ClickableAvatar innerAvatar;
|
||||
|
||||
Children = new Drawable[]
|
||||
{
|
||||
@ -115,7 +115,7 @@ namespace osu.Game.Online.Leaderboards
|
||||
Children = new[]
|
||||
{
|
||||
avatar = new DelayedLoadWrapper(
|
||||
innerAvatar = new DrawableAvatar(user)
|
||||
innerAvatar = new ClickableAvatar(user)
|
||||
{
|
||||
RelativeSizeAxes = Axes.Both,
|
||||
CornerRadius = corner_radius,
|
||||
|
@ -4,8 +4,10 @@
|
||||
#nullable enable
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Diagnostics;
|
||||
using System.Linq;
|
||||
using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
using osu.Framework.Allocation;
|
||||
using osu.Framework.Bindables;
|
||||
@ -31,7 +33,7 @@ namespace osu.Game.Online.Multiplayer
|
||||
/// <summary>
|
||||
/// Invoked when any change occurs to the multiplayer room.
|
||||
/// </summary>
|
||||
public event Action? RoomChanged;
|
||||
public event Action? RoomUpdated;
|
||||
|
||||
/// <summary>
|
||||
/// Invoked when the multiplayer server requests the current beatmap to be loaded into play.
|
||||
@ -108,8 +110,9 @@ namespace osu.Game.Online.Multiplayer
|
||||
|
||||
Debug.Assert(Room != null);
|
||||
|
||||
foreach (var user in Room.Users)
|
||||
await PopulateUser(user);
|
||||
var users = getRoomUsers();
|
||||
|
||||
await Task.WhenAll(users.Select(PopulateUser));
|
||||
|
||||
updateLocalRoomSettings(Room.Settings);
|
||||
}
|
||||
@ -122,14 +125,17 @@ namespace osu.Game.Online.Multiplayer
|
||||
protected abstract Task<MultiplayerRoom> JoinRoom(long roomId);
|
||||
|
||||
public virtual Task LeaveRoom()
|
||||
{
|
||||
Scheduler.Add(() =>
|
||||
{
|
||||
if (Room == null)
|
||||
return Task.CompletedTask;
|
||||
return;
|
||||
|
||||
apiRoom = null;
|
||||
Room = null;
|
||||
|
||||
Schedule(() => RoomChanged?.Invoke());
|
||||
RoomUpdated?.Invoke();
|
||||
}, false);
|
||||
|
||||
return Task.CompletedTask;
|
||||
}
|
||||
@ -184,7 +190,7 @@ namespace osu.Game.Online.Multiplayer
|
||||
if (Room == null)
|
||||
return Task.CompletedTask;
|
||||
|
||||
Schedule(() =>
|
||||
Scheduler.Add(() =>
|
||||
{
|
||||
if (Room == null)
|
||||
return;
|
||||
@ -208,8 +214,8 @@ namespace osu.Game.Online.Multiplayer
|
||||
break;
|
||||
}
|
||||
|
||||
RoomChanged?.Invoke();
|
||||
});
|
||||
RoomUpdated?.Invoke();
|
||||
}, false);
|
||||
|
||||
return Task.CompletedTask;
|
||||
}
|
||||
@ -221,7 +227,7 @@ namespace osu.Game.Online.Multiplayer
|
||||
|
||||
await PopulateUser(user);
|
||||
|
||||
Schedule(() =>
|
||||
Scheduler.Add(() =>
|
||||
{
|
||||
if (Room == null)
|
||||
return;
|
||||
@ -232,8 +238,8 @@ namespace osu.Game.Online.Multiplayer
|
||||
|
||||
Room.Users.Add(user);
|
||||
|
||||
RoomChanged?.Invoke();
|
||||
});
|
||||
RoomUpdated?.Invoke();
|
||||
}, false);
|
||||
}
|
||||
|
||||
Task IMultiplayerClient.UserLeft(MultiplayerRoomUser user)
|
||||
@ -241,7 +247,7 @@ namespace osu.Game.Online.Multiplayer
|
||||
if (Room == null)
|
||||
return Task.CompletedTask;
|
||||
|
||||
Schedule(() =>
|
||||
Scheduler.Add(() =>
|
||||
{
|
||||
if (Room == null)
|
||||
return;
|
||||
@ -249,8 +255,8 @@ namespace osu.Game.Online.Multiplayer
|
||||
Room.Users.Remove(user);
|
||||
PlayingUsers.Remove(user.UserID);
|
||||
|
||||
RoomChanged?.Invoke();
|
||||
});
|
||||
RoomUpdated?.Invoke();
|
||||
}, false);
|
||||
|
||||
return Task.CompletedTask;
|
||||
}
|
||||
@ -260,7 +266,7 @@ namespace osu.Game.Online.Multiplayer
|
||||
if (Room == null)
|
||||
return Task.CompletedTask;
|
||||
|
||||
Schedule(() =>
|
||||
Scheduler.Add(() =>
|
||||
{
|
||||
if (Room == null)
|
||||
return;
|
||||
@ -272,8 +278,8 @@ namespace osu.Game.Online.Multiplayer
|
||||
Room.Host = user;
|
||||
apiRoom.Host.Value = user?.User;
|
||||
|
||||
RoomChanged?.Invoke();
|
||||
});
|
||||
RoomUpdated?.Invoke();
|
||||
}, false);
|
||||
|
||||
return Task.CompletedTask;
|
||||
}
|
||||
@ -289,7 +295,7 @@ namespace osu.Game.Online.Multiplayer
|
||||
if (Room == null)
|
||||
return Task.CompletedTask;
|
||||
|
||||
Schedule(() =>
|
||||
Scheduler.Add(() =>
|
||||
{
|
||||
if (Room == null)
|
||||
return;
|
||||
@ -299,8 +305,8 @@ namespace osu.Game.Online.Multiplayer
|
||||
if (state != MultiplayerUserState.Playing)
|
||||
PlayingUsers.Remove(userId);
|
||||
|
||||
RoomChanged?.Invoke();
|
||||
});
|
||||
RoomUpdated?.Invoke();
|
||||
}, false);
|
||||
|
||||
return Task.CompletedTask;
|
||||
}
|
||||
@ -310,13 +316,13 @@ namespace osu.Game.Online.Multiplayer
|
||||
if (Room == null)
|
||||
return Task.CompletedTask;
|
||||
|
||||
Schedule(() =>
|
||||
Scheduler.Add(() =>
|
||||
{
|
||||
if (Room == null)
|
||||
return;
|
||||
|
||||
LoadRequested?.Invoke();
|
||||
});
|
||||
}, false);
|
||||
|
||||
return Task.CompletedTask;
|
||||
}
|
||||
@ -326,7 +332,7 @@ namespace osu.Game.Online.Multiplayer
|
||||
if (Room == null)
|
||||
return Task.CompletedTask;
|
||||
|
||||
Schedule(() =>
|
||||
Scheduler.Add(() =>
|
||||
{
|
||||
if (Room == null)
|
||||
return;
|
||||
@ -334,7 +340,7 @@ namespace osu.Game.Online.Multiplayer
|
||||
PlayingUsers.AddRange(Room.Users.Where(u => u.State == MultiplayerUserState.Playing).Select(u => u.UserID));
|
||||
|
||||
MatchStarted?.Invoke();
|
||||
});
|
||||
}, false);
|
||||
|
||||
return Task.CompletedTask;
|
||||
}
|
||||
@ -344,13 +350,13 @@ namespace osu.Game.Online.Multiplayer
|
||||
if (Room == null)
|
||||
return Task.CompletedTask;
|
||||
|
||||
Schedule(() =>
|
||||
Scheduler.Add(() =>
|
||||
{
|
||||
if (Room == null)
|
||||
return;
|
||||
|
||||
ResultsReady?.Invoke();
|
||||
});
|
||||
}, false);
|
||||
|
||||
return Task.CompletedTask;
|
||||
}
|
||||
@ -361,6 +367,31 @@ namespace osu.Game.Online.Multiplayer
|
||||
/// <param name="multiplayerUser">The <see cref="MultiplayerRoomUser"/> to populate.</param>
|
||||
protected async Task PopulateUser(MultiplayerRoomUser multiplayerUser) => multiplayerUser.User ??= await userLookupCache.GetUserAsync(multiplayerUser.UserID);
|
||||
|
||||
/// <summary>
|
||||
/// Retrieve a copy of users currently in the joined <see cref="Room"/> in a thread-safe manner.
|
||||
/// This should be used whenever accessing users from outside of an Update thread context (ie. when not calling <see cref="Drawable.Schedule"/>).
|
||||
/// </summary>
|
||||
/// <returns>A copy of users in the current room, or null if unavailable.</returns>
|
||||
private List<MultiplayerRoomUser>? getRoomUsers()
|
||||
{
|
||||
List<MultiplayerRoomUser>? users = null;
|
||||
|
||||
ManualResetEventSlim resetEvent = new ManualResetEventSlim();
|
||||
|
||||
// at some point we probably want to replace all these schedule calls with Room.LockForUpdate.
|
||||
// for now, as this would require quite some consideration due to the number of accesses to the room instance,
|
||||
// let's just add a manual schedule for the non-scheduled usages instead.
|
||||
Scheduler.Add(() =>
|
||||
{
|
||||
users = Room?.Users.ToList();
|
||||
resetEvent.Set();
|
||||
}, false);
|
||||
|
||||
resetEvent.Wait(100);
|
||||
|
||||
return users;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Updates the local room settings with the given <see cref="MultiplayerRoomSettings"/>.
|
||||
/// </summary>
|
||||
@ -373,7 +404,7 @@ namespace osu.Game.Online.Multiplayer
|
||||
if (Room == null)
|
||||
return;
|
||||
|
||||
Schedule(() =>
|
||||
Scheduler.Add(() =>
|
||||
{
|
||||
if (Room == null)
|
||||
return;
|
||||
@ -388,13 +419,13 @@ namespace osu.Game.Online.Multiplayer
|
||||
// In-order for the client to not display an outdated beatmap, the playlist is forcefully cleared here.
|
||||
apiRoom.Playlist.Clear();
|
||||
|
||||
RoomChanged?.Invoke();
|
||||
RoomUpdated?.Invoke();
|
||||
|
||||
var req = new GetBeatmapSetRequest(settings.BeatmapID, BeatmapSetLookupType.BeatmapId);
|
||||
req.Success += res => updatePlaylist(settings, res);
|
||||
|
||||
api.Queue(req);
|
||||
});
|
||||
}, false);
|
||||
}
|
||||
|
||||
private void updatePlaylist(MultiplayerRoomSettings settings, APIBeatmapSet onlineSet)
|
||||
|
@ -5,7 +5,7 @@ using System.Collections.Generic;
|
||||
using Humanizer;
|
||||
using osu.Framework.IO.Network;
|
||||
using osu.Game.Online.API;
|
||||
using osu.Game.Screens.Multi.Lounge.Components;
|
||||
using osu.Game.Screens.OnlinePlay.Lounge.Components;
|
||||
|
||||
namespace osu.Game.Online.Rooms
|
||||
{
|
||||
|
@ -131,6 +131,9 @@ namespace osu.Game.Online.Rooms
|
||||
RoomID.Value = other.RoomID.Value;
|
||||
Name.Value = other.Name.Value;
|
||||
|
||||
if (other.Category.Value != RoomCategory.Spotlight)
|
||||
Category.Value = other.Category.Value;
|
||||
|
||||
if (other.Host.Value != null && Host.Value?.Id != other.Host.Value.Id)
|
||||
Host.Value = other.Host.Value;
|
||||
|
||||
|
@ -25,7 +25,7 @@ namespace osu.Game.Overlays.Chat.Tabs
|
||||
if (value.Type != ChannelType.PM)
|
||||
throw new ArgumentException("Argument value needs to have the targettype user!");
|
||||
|
||||
DrawableAvatar avatar;
|
||||
ClickableAvatar avatar;
|
||||
|
||||
AddRange(new Drawable[]
|
||||
{
|
||||
@ -48,7 +48,7 @@ namespace osu.Game.Overlays.Chat.Tabs
|
||||
Anchor = Anchor.Centre,
|
||||
Origin = Anchor.Centre,
|
||||
Masking = true,
|
||||
Child = new DelayedLoadWrapper(avatar = new DrawableAvatar(value.Users.First())
|
||||
Child = new DelayedLoadWrapper(avatar = new ClickableAvatar(value.Users.First())
|
||||
{
|
||||
RelativeSizeAxes = Axes.Both,
|
||||
OpenOnClick = { Value = false },
|
||||
|
@ -11,7 +11,7 @@ using osu.Framework.Screens;
|
||||
using osu.Game.Database;
|
||||
using osu.Game.Online.API;
|
||||
using osu.Game.Online.Spectator;
|
||||
using osu.Game.Screens.Multi.Match.Components;
|
||||
using osu.Game.Screens.OnlinePlay.Match.Components;
|
||||
using osu.Game.Screens.Play;
|
||||
using osu.Game.Users;
|
||||
using osuTK;
|
||||
|
@ -17,8 +17,8 @@ using osu.Game.Online.API;
|
||||
using osu.Game.Overlays;
|
||||
using osu.Game.Screens.Backgrounds;
|
||||
using osu.Game.Screens.Edit;
|
||||
using osu.Game.Screens.Multi.Multiplayer;
|
||||
using osu.Game.Screens.Multi.Playlists;
|
||||
using osu.Game.Screens.OnlinePlay.Multiplayer;
|
||||
using osu.Game.Screens.OnlinePlay.Playlists;
|
||||
using osu.Game.Screens.Select;
|
||||
|
||||
namespace osu.Game.Screens.Menu
|
||||
|
@ -3,7 +3,7 @@
|
||||
|
||||
using osu.Game.Screens.Select;
|
||||
|
||||
namespace osu.Game.Screens.Multi.Components
|
||||
namespace osu.Game.Screens.OnlinePlay.Components
|
||||
{
|
||||
public class BeatmapDetailAreaPlaylistTabItem : BeatmapDetailAreaTabItem
|
||||
{
|
@ -10,9 +10,9 @@ using osu.Game.Graphics.Containers;
|
||||
using osu.Game.Graphics.Sprites;
|
||||
using osu.Game.Online.Chat;
|
||||
|
||||
namespace osu.Game.Screens.Multi.Components
|
||||
namespace osu.Game.Screens.OnlinePlay.Components
|
||||
{
|
||||
public class BeatmapTitle : MultiplayerComposite
|
||||
public class BeatmapTitle : OnlinePlayComposite
|
||||
{
|
||||
private readonly LinkFlowContainer textFlow;
|
||||
|
@ -9,9 +9,9 @@ using osu.Game.Graphics;
|
||||
using osu.Game.Graphics.Containers;
|
||||
using osuTK;
|
||||
|
||||
namespace osu.Game.Screens.Multi.Components
|
||||
namespace osu.Game.Screens.OnlinePlay.Components
|
||||
{
|
||||
public class BeatmapTypeInfo : MultiplayerComposite
|
||||
public class BeatmapTypeInfo : OnlinePlayComposite
|
||||
{
|
||||
private LinkFlowContainer beatmapAuthor;
|
||||
|
@ -5,7 +5,7 @@ using osu.Framework.Bindables;
|
||||
using osu.Framework.Graphics.UserInterface;
|
||||
using osu.Framework.Input.Events;
|
||||
|
||||
namespace osu.Game.Screens.Multi.Components
|
||||
namespace osu.Game.Screens.OnlinePlay.Components
|
||||
{
|
||||
public abstract class DisableableTabControl<T> : TabControl<T>
|
||||
{
|
@ -10,7 +10,7 @@ using osu.Framework.Graphics.Shapes;
|
||||
using osu.Game.Graphics;
|
||||
using osu.Game.Online.Rooms;
|
||||
|
||||
namespace osu.Game.Screens.Multi.Components
|
||||
namespace osu.Game.Screens.OnlinePlay.Components
|
||||
{
|
||||
public class DrawableGameType : CircularContainer, IHasTooltip
|
||||
{
|
@ -5,9 +5,9 @@ using System.Threading.Tasks;
|
||||
using osu.Framework.Allocation;
|
||||
using osu.Framework.Bindables;
|
||||
using osu.Game.Online.Rooms;
|
||||
using osu.Game.Screens.Multi.Lounge.Components;
|
||||
using osu.Game.Screens.OnlinePlay.Lounge.Components;
|
||||
|
||||
namespace osu.Game.Screens.Multi.Components
|
||||
namespace osu.Game.Screens.OnlinePlay.Components
|
||||
{
|
||||
/// <summary>
|
||||
/// A <see cref="RoomPollingComponent"/> that polls for the lounge listing.
|
@ -12,7 +12,7 @@ using osu.Game.Online.Rooms;
|
||||
using osu.Game.Screens.Select;
|
||||
using osuTK;
|
||||
|
||||
namespace osu.Game.Screens.Multi.Components
|
||||
namespace osu.Game.Screens.OnlinePlay.Components
|
||||
{
|
||||
public class MatchBeatmapDetailArea : BeatmapDetailArea
|
||||
{
|
@ -8,9 +8,9 @@ using osu.Framework.Graphics.Containers;
|
||||
using osu.Game.Beatmaps.Drawables;
|
||||
using osuTK;
|
||||
|
||||
namespace osu.Game.Screens.Multi.Components
|
||||
namespace osu.Game.Screens.OnlinePlay.Components
|
||||
{
|
||||
public class ModeTypeInfo : MultiplayerComposite
|
||||
public class ModeTypeInfo : OnlinePlayComposite
|
||||
{
|
||||
private const float height = 30;
|
||||
private const float transition_duration = 100;
|
@ -6,14 +6,14 @@ using osu.Framework.Allocation;
|
||||
using osu.Framework.Graphics;
|
||||
using osu.Game.Beatmaps.Drawables;
|
||||
|
||||
namespace osu.Game.Screens.Multi.Components
|
||||
namespace osu.Game.Screens.OnlinePlay.Components
|
||||
{
|
||||
public class MultiplayerBackgroundSprite : MultiplayerComposite
|
||||
public class OnlinePlayBackgroundSprite : OnlinePlayComposite
|
||||
{
|
||||
private readonly BeatmapSetCoverType beatmapSetCoverType;
|
||||
private UpdateableBeatmapBackgroundSprite sprite;
|
||||
|
||||
public MultiplayerBackgroundSprite(BeatmapSetCoverType beatmapSetCoverType = BeatmapSetCoverType.Cover)
|
||||
public OnlinePlayBackgroundSprite(BeatmapSetCoverType beatmapSetCoverType = BeatmapSetCoverType.Cover)
|
||||
{
|
||||
this.beatmapSetCoverType = beatmapSetCoverType;
|
||||
}
|
@ -10,12 +10,12 @@ using osu.Game.Graphics;
|
||||
using osu.Game.Graphics.Sprites;
|
||||
using osuTK;
|
||||
|
||||
namespace osu.Game.Screens.Multi.Components
|
||||
namespace osu.Game.Screens.OnlinePlay.Components
|
||||
{
|
||||
/// <summary>
|
||||
/// A header used in the multiplayer interface which shows text / details beneath a line.
|
||||
/// </summary>
|
||||
public class OverlinedHeader : MultiplayerComposite
|
||||
public class OverlinedHeader : OnlinePlayComposite
|
||||
{
|
||||
private bool showLine = true;
|
||||
|
@ -3,7 +3,7 @@
|
||||
|
||||
using osu.Game.Online.Rooms;
|
||||
|
||||
namespace osu.Game.Screens.Multi.Components
|
||||
namespace osu.Game.Screens.OnlinePlay.Components
|
||||
{
|
||||
public class OverlinedPlaylistHeader : OverlinedHeader
|
||||
{
|
@ -7,9 +7,9 @@ using osu.Framework.Graphics.Containers;
|
||||
using osu.Game.Graphics;
|
||||
using osu.Game.Graphics.Sprites;
|
||||
|
||||
namespace osu.Game.Screens.Multi.Components
|
||||
namespace osu.Game.Screens.OnlinePlay.Components
|
||||
{
|
||||
public class ParticipantCountDisplay : MultiplayerComposite
|
||||
public class ParticipantCountDisplay : OnlinePlayComposite
|
||||
{
|
||||
private const float text_size = 30;
|
||||
private const float transition_duration = 100;
|
@ -6,9 +6,9 @@ using osu.Framework.Bindables;
|
||||
using osu.Framework.Graphics;
|
||||
using osu.Game.Graphics.Containers;
|
||||
|
||||
namespace osu.Game.Screens.Multi.Components
|
||||
namespace osu.Game.Screens.OnlinePlay.Components
|
||||
{
|
||||
public class ParticipantsDisplay : MultiplayerComposite
|
||||
public class ParticipantsDisplay : OnlinePlayComposite
|
||||
{
|
||||
public Bindable<string> Details = new Bindable<string>();
|
||||
|
@ -12,9 +12,9 @@ using osu.Game.Users;
|
||||
using osu.Game.Users.Drawables;
|
||||
using osuTK;
|
||||
|
||||
namespace osu.Game.Screens.Multi.Components
|
||||
namespace osu.Game.Screens.OnlinePlay.Components
|
||||
{
|
||||
public class ParticipantsList : MultiplayerComposite
|
||||
public class ParticipantsList : OnlinePlayComposite
|
||||
{
|
||||
public const float TILE_SIZE = 35;
|
||||
|
@ -11,7 +11,7 @@ using osu.Game.Graphics;
|
||||
using osu.Game.Graphics.UserInterface;
|
||||
using osu.Game.Online.Rooms;
|
||||
|
||||
namespace osu.Game.Screens.Multi.Components
|
||||
namespace osu.Game.Screens.OnlinePlay.Components
|
||||
{
|
||||
public abstract class ReadyButton : TriangleButton
|
||||
{
|
@ -15,7 +15,7 @@ using osu.Game.Online.API;
|
||||
using osu.Game.Online.Rooms;
|
||||
using osu.Game.Rulesets;
|
||||
|
||||
namespace osu.Game.Screens.Multi.Components
|
||||
namespace osu.Game.Screens.OnlinePlay.Components
|
||||
{
|
||||
public abstract class RoomManager : CompositeDrawable, IRoomManager
|
||||
{
|
@ -8,7 +8,7 @@ using osu.Game.Online;
|
||||
using osu.Game.Online.API;
|
||||
using osu.Game.Online.Rooms;
|
||||
|
||||
namespace osu.Game.Screens.Multi.Components
|
||||
namespace osu.Game.Screens.OnlinePlay.Components
|
||||
{
|
||||
public abstract class RoomPollingComponent : PollingComponent
|
||||
{
|
@ -11,9 +11,9 @@ using osu.Game.Graphics;
|
||||
using osu.Game.Online.Rooms;
|
||||
using osu.Game.Online.Rooms.RoomStatuses;
|
||||
|
||||
namespace osu.Game.Screens.Multi.Components
|
||||
namespace osu.Game.Screens.OnlinePlay.Components
|
||||
{
|
||||
public class RoomStatusInfo : MultiplayerComposite
|
||||
public class RoomStatusInfo : OnlinePlayComposite
|
||||
{
|
||||
public RoomStatusInfo()
|
||||
{
|
@ -7,7 +7,7 @@ using osu.Framework.Allocation;
|
||||
using osu.Framework.Bindables;
|
||||
using osu.Game.Online.Rooms;
|
||||
|
||||
namespace osu.Game.Screens.Multi.Components
|
||||
namespace osu.Game.Screens.OnlinePlay.Components
|
||||
{
|
||||
/// <summary>
|
||||
/// A <see cref="RoomPollingComponent"/> that polls for the currently-selected room.
|
@ -8,7 +8,7 @@ using osu.Framework.Graphics.Containers;
|
||||
using osu.Game.Graphics;
|
||||
using osu.Game.Online.Rooms;
|
||||
|
||||
namespace osu.Game.Screens.Multi.Components
|
||||
namespace osu.Game.Screens.OnlinePlay.Components
|
||||
{
|
||||
public class StatusColouredContainer : Container
|
||||
{
|
@ -10,7 +10,7 @@ using osu.Game.Graphics.Containers;
|
||||
using osu.Game.Online.Rooms;
|
||||
using osuTK;
|
||||
|
||||
namespace osu.Game.Screens.Multi
|
||||
namespace osu.Game.Screens.OnlinePlay
|
||||
{
|
||||
public class DrawableRoomPlaylist : OsuRearrangeableListContainer<PlaylistItem>
|
||||
{
|
@ -29,7 +29,7 @@ using osu.Game.Screens.Play.HUD;
|
||||
using osuTK;
|
||||
using osuTK.Graphics;
|
||||
|
||||
namespace osu.Game.Screens.Multi
|
||||
namespace osu.Game.Screens.OnlinePlay
|
||||
{
|
||||
public class DrawableRoomPlaylistItem : OsuRearrangeableListItem<PlaylistItem>
|
||||
{
|
@ -13,7 +13,7 @@ using osu.Game.Graphics.Containers;
|
||||
using osu.Game.Graphics.UserInterface;
|
||||
using osu.Game.Online.Rooms;
|
||||
|
||||
namespace osu.Game.Screens.Multi
|
||||
namespace osu.Game.Screens.OnlinePlay
|
||||
{
|
||||
public class DrawableRoomPlaylistWithResults : DrawableRoomPlaylist
|
||||
{
|
@ -10,13 +10,13 @@ using osu.Framework.Graphics.Shapes;
|
||||
using osu.Framework.Graphics.UserInterface;
|
||||
using osu.Framework.Screens;
|
||||
using osu.Game.Graphics;
|
||||
using osu.Game.Graphics.UserInterface;
|
||||
using osu.Game.Graphics.Sprites;
|
||||
using osu.Game.Graphics.UserInterface;
|
||||
using osu.Game.Overlays;
|
||||
using osuTK;
|
||||
using osuTK.Graphics;
|
||||
|
||||
namespace osu.Game.Screens.Multi
|
||||
namespace osu.Game.Screens.OnlinePlay
|
||||
{
|
||||
public class Header : Container
|
||||
{
|
||||
@ -61,8 +61,8 @@ namespace osu.Game.Screens.Multi
|
||||
|
||||
breadcrumbs.Current.ValueChanged += screen =>
|
||||
{
|
||||
if (screen.NewValue is IMultiplayerSubScreen multiScreen)
|
||||
title.Screen = multiScreen;
|
||||
if (screen.NewValue is IOnlinePlaySubScreen onlineSubScreen)
|
||||
title.Screen = onlineSubScreen;
|
||||
};
|
||||
|
||||
breadcrumbs.Current.TriggerChange();
|
||||
@ -75,7 +75,7 @@ namespace osu.Game.Screens.Multi
|
||||
private readonly OsuSpriteText dot;
|
||||
private readonly OsuSpriteText pageTitle;
|
||||
|
||||
public IMultiplayerSubScreen Screen
|
||||
public IOnlinePlaySubScreen Screen
|
||||
{
|
||||
set => pageTitle.Text = value.ShortTitle.Titleize();
|
||||
}
|
@ -1,9 +1,9 @@
|
||||
// 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.
|
||||
|
||||
namespace osu.Game.Screens.Multi
|
||||
namespace osu.Game.Screens.OnlinePlay
|
||||
{
|
||||
public interface IMultiplayerSubScreen : IOsuScreen
|
||||
public interface IOnlinePlaySubScreen : IOsuScreen
|
||||
{
|
||||
string Title { get; }
|
||||
|
@ -6,7 +6,7 @@ using osu.Framework.Allocation;
|
||||
using osu.Framework.Bindables;
|
||||
using osu.Game.Online.Rooms;
|
||||
|
||||
namespace osu.Game.Screens.Multi
|
||||
namespace osu.Game.Screens.OnlinePlay
|
||||
{
|
||||
[Cached(typeof(IRoomManager))]
|
||||
public interface IRoomManager
|
@ -9,22 +9,22 @@ using osu.Framework.Bindables;
|
||||
using osu.Framework.Extensions.Color4Extensions;
|
||||
using osu.Framework.Graphics;
|
||||
using osu.Framework.Graphics.Containers;
|
||||
using osu.Framework.Graphics.Cursor;
|
||||
using osu.Framework.Graphics.Effects;
|
||||
using osu.Framework.Graphics.Shapes;
|
||||
using osu.Framework.Graphics.UserInterface;
|
||||
using osu.Game.Beatmaps;
|
||||
using osu.Game.Beatmaps.Drawables;
|
||||
using osu.Game.Graphics;
|
||||
using osu.Game.Graphics.Containers;
|
||||
using osu.Game.Graphics.Sprites;
|
||||
using osu.Game.Graphics.UserInterface;
|
||||
using osu.Game.Screens.Multi.Components;
|
||||
using osu.Game.Online.Rooms;
|
||||
using osu.Game.Screens.OnlinePlay.Components;
|
||||
using osuTK;
|
||||
using osuTK.Graphics;
|
||||
using osu.Framework.Graphics.Cursor;
|
||||
using osu.Framework.Graphics.UserInterface;
|
||||
using osu.Game.Online.Rooms;
|
||||
|
||||
namespace osu.Game.Screens.Multi.Lounge.Components
|
||||
namespace osu.Game.Screens.OnlinePlay.Lounge.Components
|
||||
{
|
||||
public class DrawableRoom : OsuClickableContainer, IStateful<SelectionState>, IFilterable, IHasContextMenu
|
||||
{
|
||||
@ -42,7 +42,7 @@ namespace osu.Game.Screens.Multi.Lounge.Components
|
||||
private CachedModelDependencyContainer<Room> dependencies;
|
||||
|
||||
[Resolved(canBeNull: true)]
|
||||
private MultiplayerScreen multiplayer { get; set; }
|
||||
private OnlinePlayScreen parentScreen { get; set; }
|
||||
|
||||
[Resolved]
|
||||
private BeatmapManager beatmaps { get; set; }
|
||||
@ -155,7 +155,7 @@ namespace osu.Game.Screens.Multi.Lounge.Components
|
||||
Width = cover_width,
|
||||
Masking = true,
|
||||
Margin = new MarginPadding { Left = stripWidth },
|
||||
Child = new MultiplayerBackgroundSprite(BeatmapSetCoverType.List) { RelativeSizeAxes = Axes.Both }
|
||||
Child = new OnlinePlayBackgroundSprite(BeatmapSetCoverType.List) { RelativeSizeAxes = Axes.Both }
|
||||
},
|
||||
new Container
|
||||
{
|
||||
@ -242,7 +242,7 @@ namespace osu.Game.Screens.Multi.Lounge.Components
|
||||
{
|
||||
new OsuMenuItem("Create copy", MenuItemType.Standard, () =>
|
||||
{
|
||||
multiplayer?.OpenNewRoom(Room.CreateCopy());
|
||||
parentScreen?.OpenNewRoom(Room.CreateCopy());
|
||||
})
|
||||
};
|
||||
}
|
@ -12,7 +12,7 @@ using osu.Game.Graphics.UserInterface;
|
||||
using osu.Game.Rulesets;
|
||||
using osuTK.Graphics;
|
||||
|
||||
namespace osu.Game.Screens.Multi.Lounge.Components
|
||||
namespace osu.Game.Screens.OnlinePlay.Lounge.Components
|
||||
{
|
||||
public abstract class FilterControl : CompositeDrawable
|
||||
{
|
@ -3,7 +3,7 @@
|
||||
|
||||
using osu.Game.Rulesets;
|
||||
|
||||
namespace osu.Game.Screens.Multi.Lounge.Components
|
||||
namespace osu.Game.Screens.OnlinePlay.Lounge.Components
|
||||
{
|
||||
public class FilterCriteria
|
||||
{
|
@ -11,9 +11,9 @@ using osu.Game.Graphics.Sprites;
|
||||
using osu.Game.Users.Drawables;
|
||||
using osuTK;
|
||||
|
||||
namespace osu.Game.Screens.Multi.Lounge.Components
|
||||
namespace osu.Game.Screens.OnlinePlay.Lounge.Components
|
||||
{
|
||||
public class ParticipantInfo : MultiplayerComposite
|
||||
public class ParticipantInfo : OnlinePlayComposite
|
||||
{
|
||||
public ParticipantInfo()
|
||||
{
|
@ -5,7 +5,7 @@ using osu.Framework.Graphics;
|
||||
using osu.Framework.Graphics.UserInterface;
|
||||
using osu.Game.Graphics.UserInterface;
|
||||
|
||||
namespace osu.Game.Screens.Multi.Lounge.Components
|
||||
namespace osu.Game.Screens.OnlinePlay.Lounge.Components
|
||||
{
|
||||
public class PlaylistsFilterControl : FilterControl
|
||||
{
|
@ -6,12 +6,12 @@ using osu.Framework.Graphics;
|
||||
using osu.Framework.Graphics.Containers;
|
||||
using osu.Game.Graphics;
|
||||
using osu.Game.Graphics.Containers;
|
||||
using osu.Game.Screens.Multi.Components;
|
||||
using osu.Game.Screens.OnlinePlay.Components;
|
||||
using osuTK;
|
||||
|
||||
namespace osu.Game.Screens.Multi.Lounge.Components
|
||||
namespace osu.Game.Screens.OnlinePlay.Lounge.Components
|
||||
{
|
||||
public class RoomInfo : MultiplayerComposite
|
||||
public class RoomInfo : OnlinePlayComposite
|
||||
{
|
||||
private readonly List<Drawable> statusElements = new List<Drawable>();
|
||||
private readonly OsuTextFlowContainer roomName;
|
@ -7,12 +7,12 @@ using osu.Framework.Graphics.Containers;
|
||||
using osu.Framework.Graphics.Shapes;
|
||||
using osu.Game.Beatmaps;
|
||||
using osu.Game.Graphics;
|
||||
using osu.Game.Screens.Multi.Components;
|
||||
using osu.Game.Screens.OnlinePlay.Components;
|
||||
using osuTK.Graphics;
|
||||
|
||||
namespace osu.Game.Screens.Multi.Lounge.Components
|
||||
namespace osu.Game.Screens.OnlinePlay.Lounge.Components
|
||||
{
|
||||
public class RoomInspector : MultiplayerComposite
|
||||
public class RoomInspector : OnlinePlayComposite
|
||||
{
|
||||
private const float transition_duration = 100;
|
||||
|
@ -3,7 +3,7 @@
|
||||
|
||||
using System.ComponentModel;
|
||||
|
||||
namespace osu.Game.Screens.Multi.Lounge.Components
|
||||
namespace osu.Game.Screens.OnlinePlay.Lounge.Components
|
||||
{
|
||||
public enum RoomStatusFilter
|
||||
{
|
@ -13,13 +13,13 @@ using osu.Framework.Graphics.Containers;
|
||||
using osu.Framework.Input.Bindings;
|
||||
using osu.Framework.Threading;
|
||||
using osu.Game.Extensions;
|
||||
using osu.Game.Graphics.Cursor;
|
||||
using osu.Game.Graphics.UserInterface;
|
||||
using osu.Game.Input.Bindings;
|
||||
using osuTK;
|
||||
using osu.Game.Graphics.Cursor;
|
||||
using osu.Game.Online.Rooms;
|
||||
using osuTK;
|
||||
|
||||
namespace osu.Game.Screens.Multi.Lounge.Components
|
||||
namespace osu.Game.Screens.OnlinePlay.Lounge.Components
|
||||
{
|
||||
public class RoomsContainer : CompositeDrawable, IKeyBindingHandler<GlobalAction>
|
||||
{
|
@ -12,14 +12,14 @@ using osu.Game.Graphics.Containers;
|
||||
using osu.Game.Graphics.UserInterface;
|
||||
using osu.Game.Online.Rooms;
|
||||
using osu.Game.Overlays;
|
||||
using osu.Game.Screens.Multi.Lounge.Components;
|
||||
using osu.Game.Screens.Multi.Match;
|
||||
using osu.Game.Screens.OnlinePlay.Lounge.Components;
|
||||
using osu.Game.Screens.OnlinePlay.Match;
|
||||
using osu.Game.Users;
|
||||
|
||||
namespace osu.Game.Screens.Multi.Lounge
|
||||
namespace osu.Game.Screens.OnlinePlay.Lounge
|
||||
{
|
||||
[Cached]
|
||||
public abstract class LoungeSubScreen : MultiplayerSubScreen
|
||||
public abstract class LoungeSubScreen : OnlinePlaySubScreen
|
||||
{
|
||||
public override string Title => "Lounge";
|
||||
|
@ -10,10 +10,10 @@ using osu.Framework.Graphics.Containers;
|
||||
using osu.Framework.Graphics.Shapes;
|
||||
using osu.Game.Graphics;
|
||||
using osu.Game.Online.Rooms;
|
||||
using osu.Game.Screens.Multi.Playlists;
|
||||
using osu.Game.Screens.OnlinePlay.Playlists;
|
||||
using osuTK;
|
||||
|
||||
namespace osu.Game.Screens.Multi.Match.Components
|
||||
namespace osu.Game.Screens.OnlinePlay.Match.Components
|
||||
{
|
||||
public class Footer : CompositeDrawable
|
||||
{
|
@ -10,10 +10,10 @@ using osu.Framework.Input.Events;
|
||||
using osu.Game.Graphics;
|
||||
using osu.Game.Online.Rooms;
|
||||
using osu.Game.Online.Rooms.GameTypes;
|
||||
using osu.Game.Screens.Multi.Components;
|
||||
using osu.Game.Screens.OnlinePlay.Components;
|
||||
using osuTK;
|
||||
|
||||
namespace osu.Game.Screens.Multi.Match.Components
|
||||
namespace osu.Game.Screens.OnlinePlay.Match.Components
|
||||
{
|
||||
public class GameTypePicker : DisableableTabControl<GameType>
|
||||
{
|
@ -10,9 +10,9 @@ using osu.Game.Graphics.Sprites;
|
||||
using osu.Game.Users.Drawables;
|
||||
using osuTK;
|
||||
|
||||
namespace osu.Game.Screens.Multi.Match.Components
|
||||
namespace osu.Game.Screens.OnlinePlay.Match.Components
|
||||
{
|
||||
public class Header : MultiplayerComposite
|
||||
public class Header : OnlinePlayComposite
|
||||
{
|
||||
public const float HEIGHT = 50;
|
||||
|
@ -6,7 +6,7 @@ using osu.Framework.Bindables;
|
||||
using osu.Game.Online.Chat;
|
||||
using osu.Game.Online.Rooms;
|
||||
|
||||
namespace osu.Game.Screens.Multi.Match.Components
|
||||
namespace osu.Game.Screens.OnlinePlay.Match.Components
|
||||
{
|
||||
public class MatchChatDisplay : StandAloneChatDisplay
|
||||
{
|
@ -10,7 +10,7 @@ using osu.Game.Online.API.Requests.Responses;
|
||||
using osu.Game.Online.Leaderboards;
|
||||
using osu.Game.Online.Rooms;
|
||||
|
||||
namespace osu.Game.Screens.Multi.Match.Components
|
||||
namespace osu.Game.Screens.OnlinePlay.Match.Components
|
||||
{
|
||||
public class MatchLeaderboard : Leaderboard<MatchLeaderboardScope, APIUserScoreAggregate>
|
||||
{
|
@ -8,7 +8,7 @@ using osu.Game.Online.API.Requests.Responses;
|
||||
using osu.Game.Online.Leaderboards;
|
||||
using osu.Game.Scoring;
|
||||
|
||||
namespace osu.Game.Screens.Multi.Match.Components
|
||||
namespace osu.Game.Screens.OnlinePlay.Match.Components
|
||||
{
|
||||
public class MatchLeaderboardScore : LeaderboardScore
|
||||
{
|
@ -10,14 +10,14 @@ using osu.Game.Graphics.UserInterface;
|
||||
using osuTK;
|
||||
using osuTK.Graphics;
|
||||
|
||||
namespace osu.Game.Screens.Multi.Match.Components
|
||||
namespace osu.Game.Screens.OnlinePlay.Match.Components
|
||||
{
|
||||
public abstract class MatchSettingsOverlay : FocusedOverlayContainer
|
||||
{
|
||||
protected const float TRANSITION_DURATION = 350;
|
||||
protected const float FIELD_PADDING = 45;
|
||||
|
||||
protected MultiplayerComposite Settings { get; set; }
|
||||
protected OnlinePlayComposite Settings { get; set; }
|
||||
|
||||
[BackgroundDependencyLoader]
|
||||
private void load()
|
@ -5,7 +5,7 @@ using osu.Framework.Allocation;
|
||||
using osu.Framework.Extensions.Color4Extensions;
|
||||
using osu.Game.Graphics.UserInterface;
|
||||
|
||||
namespace osu.Game.Screens.Multi.Match.Components
|
||||
namespace osu.Game.Screens.OnlinePlay.Match.Components
|
||||
{
|
||||
public class PurpleTriangleButton : TriangleButton
|
||||
{
|
@ -11,11 +11,11 @@ using osu.Framework.Input.Events;
|
||||
using osu.Game.Graphics;
|
||||
using osu.Game.Graphics.Sprites;
|
||||
using osu.Game.Online.Rooms;
|
||||
using osu.Game.Screens.Multi.Components;
|
||||
using osu.Game.Screens.OnlinePlay.Components;
|
||||
using osuTK;
|
||||
using osuTK.Graphics;
|
||||
|
||||
namespace osu.Game.Screens.Multi.Match.Components
|
||||
namespace osu.Game.Screens.OnlinePlay.Match.Components
|
||||
{
|
||||
public class RoomAvailabilityPicker : DisableableTabControl<RoomAvailability>
|
||||
{
|
@ -15,10 +15,10 @@ using osu.Game.Overlays;
|
||||
using osu.Game.Rulesets.Mods;
|
||||
using osu.Game.Screens.Play;
|
||||
|
||||
namespace osu.Game.Screens.Multi.Match
|
||||
namespace osu.Game.Screens.OnlinePlay.Match
|
||||
{
|
||||
[Cached(typeof(IPreviewTrackOwner))]
|
||||
public abstract class RoomSubScreen : MultiplayerSubScreen, IPreviewTrackOwner
|
||||
public abstract class RoomSubScreen : OnlinePlaySubScreen, IPreviewTrackOwner
|
||||
{
|
||||
protected readonly Bindable<PlaylistItem> SelectedItem = new Bindable<PlaylistItem>();
|
||||
|
||||
@ -36,7 +36,7 @@ namespace osu.Game.Screens.Multi.Match
|
||||
private BeatmapManager beatmapManager { get; set; }
|
||||
|
||||
[Resolved(canBeNull: true)]
|
||||
protected MultiplayerScreen Multiplayer { get; private set; }
|
||||
protected OnlinePlayScreen ParentScreen { get; private set; }
|
||||
|
||||
private IBindable<WeakReference<BeatmapSetInfo>> managerUpdated;
|
||||
|
||||
@ -88,7 +88,7 @@ namespace osu.Game.Screens.Multi.Match
|
||||
protected void StartPlay(Func<Player> player)
|
||||
{
|
||||
sampleStart?.Play();
|
||||
Multiplayer?.Push(new PlayerLoader(player));
|
||||
ParentScreen?.Push(new PlayerLoader(player));
|
||||
}
|
||||
|
||||
private void selectedItemChanged()
|
@ -4,9 +4,9 @@
|
||||
using osu.Framework.Allocation;
|
||||
using osu.Framework.Bindables;
|
||||
using osu.Game.Online.Multiplayer;
|
||||
using osu.Game.Screens.Multi.Match.Components;
|
||||
using osu.Game.Screens.OnlinePlay.Match.Components;
|
||||
|
||||
namespace osu.Game.Screens.Multi.Multiplayer
|
||||
namespace osu.Game.Screens.OnlinePlay.Multiplayer
|
||||
{
|
||||
public class CreateMultiplayerMatchButton : PurpleTriangleButton
|
||||
{
|
@ -9,11 +9,11 @@ using osu.Framework.Graphics.Containers;
|
||||
using osu.Framework.Graphics.UserInterface;
|
||||
using osu.Framework.Screens;
|
||||
using osu.Game.Online.API;
|
||||
using osu.Game.Screens.Multi.Match.Components;
|
||||
using osu.Game.Screens.OnlinePlay.Match.Components;
|
||||
|
||||
namespace osu.Game.Screens.Multi.Multiplayer.Match
|
||||
namespace osu.Game.Screens.OnlinePlay.Multiplayer.Match
|
||||
{
|
||||
public class BeatmapSelectionControl : MultiplayerComposite
|
||||
public class BeatmapSelectionControl : OnlinePlayComposite
|
||||
{
|
||||
[Resolved]
|
||||
private MultiplayerMatchSubScreen matchSubScreen { get; set; }
|
@ -11,7 +11,7 @@ using osu.Game.Graphics;
|
||||
using osu.Game.Online.Rooms;
|
||||
using osuTK;
|
||||
|
||||
namespace osu.Game.Screens.Multi.Multiplayer.Match
|
||||
namespace osu.Game.Screens.OnlinePlay.Multiplayer.Match
|
||||
{
|
||||
public class MultiplayerMatchFooter : CompositeDrawable
|
||||
{
|
@ -10,16 +10,16 @@ using osu.Game.Graphics;
|
||||
using osu.Game.Graphics.Containers;
|
||||
using osu.Game.Graphics.Sprites;
|
||||
using osu.Game.Online.API;
|
||||
using osu.Game.Screens.Multi.Match.Components;
|
||||
using osu.Game.Screens.OnlinePlay.Match.Components;
|
||||
using osu.Game.Users.Drawables;
|
||||
using osuTK;
|
||||
using FontWeight = osu.Game.Graphics.FontWeight;
|
||||
using OsuColour = osu.Game.Graphics.OsuColour;
|
||||
using OsuFont = osu.Game.Graphics.OsuFont;
|
||||
|
||||
namespace osu.Game.Screens.Multi.Multiplayer.Match
|
||||
namespace osu.Game.Screens.OnlinePlay.Multiplayer.Match
|
||||
{
|
||||
public class MultiplayerMatchHeader : MultiplayerComposite
|
||||
public class MultiplayerMatchHeader : OnlinePlayComposite
|
||||
{
|
||||
public const float HEIGHT = 50;
|
||||
|
@ -18,10 +18,10 @@ using osu.Game.Online.Multiplayer;
|
||||
using osu.Game.Online.Rooms;
|
||||
using osu.Game.Overlays;
|
||||
using osu.Game.Rulesets;
|
||||
using osu.Game.Screens.Multi.Match.Components;
|
||||
using osu.Game.Screens.OnlinePlay.Match.Components;
|
||||
using osuTK;
|
||||
|
||||
namespace osu.Game.Screens.Multi.Multiplayer.Match
|
||||
namespace osu.Game.Screens.OnlinePlay.Multiplayer.Match
|
||||
{
|
||||
public class MultiplayerMatchSettingsOverlay : MatchSettingsOverlay
|
||||
{
|
||||
@ -36,7 +36,7 @@ namespace osu.Game.Screens.Multi.Multiplayer.Match
|
||||
};
|
||||
}
|
||||
|
||||
protected class MatchSettings : MultiplayerComposite
|
||||
protected class MatchSettings : OnlinePlayComposite
|
||||
{
|
||||
private const float disabled_alpha = 0.2f;
|
||||
|
@ -15,10 +15,10 @@ using osu.Game.Graphics.Backgrounds;
|
||||
using osu.Game.Online.API;
|
||||
using osu.Game.Online.Multiplayer;
|
||||
using osu.Game.Online.Rooms;
|
||||
using osu.Game.Screens.Multi.Components;
|
||||
using osu.Game.Screens.OnlinePlay.Components;
|
||||
using osuTK;
|
||||
|
||||
namespace osu.Game.Screens.Multi.Multiplayer.Match
|
||||
namespace osu.Game.Screens.OnlinePlay.Multiplayer.Match
|
||||
{
|
||||
public class MultiplayerReadyButton : MultiplayerRoomComposite
|
||||
{
|
||||
@ -56,11 +56,13 @@ namespace osu.Game.Screens.Multi.Multiplayer.Match
|
||||
sampleReadyCount = audio.Samples.Get(@"SongSelect/select-difficulty");
|
||||
}
|
||||
|
||||
protected override void OnRoomChanged()
|
||||
protected override void OnRoomUpdated()
|
||||
{
|
||||
base.OnRoomChanged();
|
||||
base.OnRoomUpdated();
|
||||
|
||||
// this method is called on leaving the room, so the local user may not exist in the room any more.
|
||||
localUser = Room?.Users.SingleOrDefault(u => u.User?.Id == api.LocalUser.Value.Id);
|
||||
|
||||
localUser = Room?.Users.Single(u => u.User?.Id == api.LocalUser.Value.Id);
|
||||
button.Enabled.Value = Client.Room?.State == MultiplayerRoomState.Open;
|
||||
updateState();
|
||||
}
|
@ -8,12 +8,12 @@ using osu.Game.Extensions;
|
||||
using osu.Game.Graphics.UserInterface;
|
||||
using osu.Game.Online.Multiplayer;
|
||||
using osu.Game.Online.Rooms;
|
||||
using osu.Game.Screens.Multi.Components;
|
||||
using osu.Game.Screens.Multi.Lounge;
|
||||
using osu.Game.Screens.OnlinePlay.Components;
|
||||
using osu.Game.Screens.OnlinePlay.Lounge;
|
||||
|
||||
namespace osu.Game.Screens.Multi.Multiplayer
|
||||
namespace osu.Game.Screens.OnlinePlay.Multiplayer
|
||||
{
|
||||
public class Multiplayer : MultiplayerScreen
|
||||
public class Multiplayer : OnlinePlayScreen
|
||||
{
|
||||
[Resolved]
|
||||
private StatefulMultiplayerClient client { get; set; }
|
@ -1,9 +1,9 @@
|
||||
// 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.
|
||||
|
||||
using osu.Game.Screens.Multi.Lounge.Components;
|
||||
using osu.Game.Screens.OnlinePlay.Lounge.Components;
|
||||
|
||||
namespace osu.Game.Screens.Multi.Multiplayer
|
||||
namespace osu.Game.Screens.OnlinePlay.Multiplayer
|
||||
{
|
||||
public class MultiplayerFilterControl : FilterControl
|
||||
{
|
@ -5,11 +5,11 @@ using osu.Framework.Allocation;
|
||||
using osu.Framework.Logging;
|
||||
using osu.Game.Online.Multiplayer;
|
||||
using osu.Game.Online.Rooms;
|
||||
using osu.Game.Screens.Multi.Lounge;
|
||||
using osu.Game.Screens.Multi.Lounge.Components;
|
||||
using osu.Game.Screens.Multi.Match;
|
||||
using osu.Game.Screens.OnlinePlay.Lounge;
|
||||
using osu.Game.Screens.OnlinePlay.Lounge.Components;
|
||||
using osu.Game.Screens.OnlinePlay.Match;
|
||||
|
||||
namespace osu.Game.Screens.Multi.Multiplayer
|
||||
namespace osu.Game.Screens.OnlinePlay.Multiplayer
|
||||
{
|
||||
public class MultiplayerLoungeSubScreen : LoungeSubScreen
|
||||
{
|
@ -13,9 +13,9 @@ using osu.Game.Online.Multiplayer;
|
||||
using osu.Game.Online.Rooms;
|
||||
using osu.Game.Screens.Select;
|
||||
|
||||
namespace osu.Game.Screens.Multi.Multiplayer
|
||||
namespace osu.Game.Screens.OnlinePlay.Multiplayer
|
||||
{
|
||||
public class MultiplayerMatchSongSelect : SongSelect, IMultiplayerSubScreen
|
||||
public class MultiplayerMatchSongSelect : SongSelect, IOnlinePlaySubScreen
|
||||
{
|
||||
public string ShortTitle => "song selection";
|
||||
|
@ -11,15 +11,15 @@ using osu.Framework.Graphics.Containers;
|
||||
using osu.Framework.Screens;
|
||||
using osu.Game.Online.Multiplayer;
|
||||
using osu.Game.Online.Rooms;
|
||||
using osu.Game.Screens.Multi.Components;
|
||||
using osu.Game.Screens.Multi.Match;
|
||||
using osu.Game.Screens.Multi.Match.Components;
|
||||
using osu.Game.Screens.Multi.Multiplayer.Match;
|
||||
using osu.Game.Screens.Multi.Multiplayer.Participants;
|
||||
using osu.Game.Screens.OnlinePlay.Components;
|
||||
using osu.Game.Screens.OnlinePlay.Match;
|
||||
using osu.Game.Screens.OnlinePlay.Match.Components;
|
||||
using osu.Game.Screens.OnlinePlay.Multiplayer.Match;
|
||||
using osu.Game.Screens.OnlinePlay.Multiplayer.Participants;
|
||||
using osu.Game.Users;
|
||||
using ParticipantsList = osu.Game.Screens.Multi.Multiplayer.Participants.ParticipantsList;
|
||||
using ParticipantsList = osu.Game.Screens.OnlinePlay.Multiplayer.Participants.ParticipantsList;
|
||||
|
||||
namespace osu.Game.Screens.Multi.Multiplayer
|
||||
namespace osu.Game.Screens.OnlinePlay.Multiplayer
|
||||
{
|
||||
[Cached]
|
||||
public class MultiplayerMatchSubScreen : RoomSubScreen
|
@ -11,13 +11,13 @@ using osu.Game.Graphics.UserInterface;
|
||||
using osu.Game.Online.Multiplayer;
|
||||
using osu.Game.Online.Rooms;
|
||||
using osu.Game.Scoring;
|
||||
using osu.Game.Screens.Multi.Playlists;
|
||||
using osu.Game.Screens.OnlinePlay.Playlists;
|
||||
using osu.Game.Screens.Play;
|
||||
using osu.Game.Screens.Play.HUD;
|
||||
using osu.Game.Screens.Ranking;
|
||||
using osuTK;
|
||||
|
||||
namespace osu.Game.Screens.Multi.Multiplayer
|
||||
namespace osu.Game.Screens.OnlinePlay.Multiplayer
|
||||
{
|
||||
// Todo: The "room" part of PlaylistsPlayer should be split out into an abstract player class to be inherited instead.
|
||||
public class MultiplayerPlayer : PlaylistsPlayer
|
@ -3,9 +3,9 @@
|
||||
|
||||
using osu.Game.Online.Rooms;
|
||||
using osu.Game.Scoring;
|
||||
using osu.Game.Screens.Multi.Playlists;
|
||||
using osu.Game.Screens.OnlinePlay.Playlists;
|
||||
|
||||
namespace osu.Game.Screens.Multi.Multiplayer
|
||||
namespace osu.Game.Screens.OnlinePlay.Multiplayer
|
||||
{
|
||||
public class MultiplayerResultsScreen : PlaylistsResultsScreen
|
||||
{
|
@ -5,9 +5,9 @@ using JetBrains.Annotations;
|
||||
using osu.Framework.Allocation;
|
||||
using osu.Game.Online.Multiplayer;
|
||||
|
||||
namespace osu.Game.Screens.Multi.Multiplayer
|
||||
namespace osu.Game.Screens.OnlinePlay.Multiplayer
|
||||
{
|
||||
public abstract class MultiplayerRoomComposite : MultiplayerComposite
|
||||
public abstract class MultiplayerRoomComposite : OnlinePlayComposite
|
||||
{
|
||||
[CanBeNull]
|
||||
protected MultiplayerRoom Room => Client.Room;
|
||||
@ -19,18 +19,21 @@ namespace osu.Game.Screens.Multi.Multiplayer
|
||||
{
|
||||
base.LoadComplete();
|
||||
|
||||
Client.RoomChanged += OnRoomChanged;
|
||||
OnRoomChanged();
|
||||
Client.RoomUpdated += OnRoomUpdated;
|
||||
OnRoomUpdated();
|
||||
}
|
||||
|
||||
protected virtual void OnRoomChanged()
|
||||
/// <summary>
|
||||
/// Invoked when any change occurs to the multiplayer room.
|
||||
/// </summary>
|
||||
protected virtual void OnRoomUpdated()
|
||||
{
|
||||
}
|
||||
|
||||
protected override void Dispose(bool isDisposing)
|
||||
{
|
||||
if (Client != null)
|
||||
Client.RoomChanged -= OnRoomChanged;
|
||||
Client.RoomUpdated -= OnRoomUpdated;
|
||||
|
||||
base.Dispose(isDisposing);
|
||||
}
|
@ -13,9 +13,9 @@ using osu.Game.Extensions;
|
||||
using osu.Game.Online.Multiplayer;
|
||||
using osu.Game.Online.Rooms;
|
||||
using osu.Game.Online.Rooms.RoomStatuses;
|
||||
using osu.Game.Screens.Multi.Components;
|
||||
using osu.Game.Screens.OnlinePlay.Components;
|
||||
|
||||
namespace osu.Game.Screens.Multi.Multiplayer
|
||||
namespace osu.Game.Screens.OnlinePlay.Multiplayer
|
||||
{
|
||||
public class MultiplayerRoomManager : RoomManager
|
||||
{
|
@ -22,7 +22,7 @@ using osu.Game.Users.Drawables;
|
||||
using osuTK;
|
||||
using osuTK.Graphics;
|
||||
|
||||
namespace osu.Game.Screens.Multi.Multiplayer.Participants
|
||||
namespace osu.Game.Screens.OnlinePlay.Multiplayer.Participants
|
||||
{
|
||||
public class ParticipantPanel : MultiplayerRoomComposite, IHasContextMenu
|
||||
{
|
||||
@ -135,9 +135,9 @@ namespace osu.Game.Screens.Multi.Multiplayer.Participants
|
||||
};
|
||||
}
|
||||
|
||||
protected override void OnRoomChanged()
|
||||
protected override void OnRoomUpdated()
|
||||
{
|
||||
base.OnRoomChanged();
|
||||
base.OnRoomUpdated();
|
||||
|
||||
if (Room == null)
|
||||
return;
|
@ -9,7 +9,7 @@ using osu.Game.Graphics.Containers;
|
||||
using osu.Game.Graphics.Cursor;
|
||||
using osuTK;
|
||||
|
||||
namespace osu.Game.Screens.Multi.Multiplayer.Participants
|
||||
namespace osu.Game.Screens.OnlinePlay.Multiplayer.Participants
|
||||
{
|
||||
public class ParticipantsList : MultiplayerRoomComposite
|
||||
{
|
||||
@ -36,9 +36,9 @@ namespace osu.Game.Screens.Multi.Multiplayer.Participants
|
||||
};
|
||||
}
|
||||
|
||||
protected override void OnRoomChanged()
|
||||
protected override void OnRoomUpdated()
|
||||
{
|
||||
base.OnRoomChanged();
|
||||
base.OnRoomUpdated();
|
||||
|
||||
if (Room == null)
|
||||
panels.Clear();
|
@ -3,9 +3,9 @@
|
||||
|
||||
using osu.Framework.Allocation;
|
||||
using osu.Game.Online.Multiplayer;
|
||||
using osu.Game.Screens.Multi.Components;
|
||||
using osu.Game.Screens.OnlinePlay.Components;
|
||||
|
||||
namespace osu.Game.Screens.Multi.Multiplayer.Participants
|
||||
namespace osu.Game.Screens.OnlinePlay.Multiplayer.Participants
|
||||
{
|
||||
public class ParticipantsListHeader : OverlinedHeader
|
||||
{
|
@ -11,7 +11,7 @@ using osu.Game.Graphics.Sprites;
|
||||
using osu.Game.Online.Multiplayer;
|
||||
using osuTK;
|
||||
|
||||
namespace osu.Game.Screens.Multi.Multiplayer.Participants
|
||||
namespace osu.Game.Screens.OnlinePlay.Multiplayer.Participants
|
||||
{
|
||||
public class StateDisplay : CompositeDrawable
|
||||
{
|
@ -8,9 +8,9 @@ using osu.Framework.Graphics.Containers;
|
||||
using osu.Game.Online.Rooms;
|
||||
using osu.Game.Users;
|
||||
|
||||
namespace osu.Game.Screens.Multi
|
||||
namespace osu.Game.Screens.OnlinePlay
|
||||
{
|
||||
public class MultiplayerComposite : CompositeDrawable
|
||||
public class OnlinePlayComposite : CompositeDrawable
|
||||
{
|
||||
[Resolved(typeof(Room))]
|
||||
protected Bindable<int?> RoomID { get; private set; }
|
@ -17,19 +17,19 @@ using osu.Game.Online.API;
|
||||
using osu.Game.Online.Rooms;
|
||||
using osu.Game.Overlays;
|
||||
using osu.Game.Screens.Menu;
|
||||
using osu.Game.Screens.Multi.Components;
|
||||
using osu.Game.Screens.Multi.Lounge;
|
||||
using osu.Game.Screens.Multi.Lounge.Components;
|
||||
using osu.Game.Screens.Multi.Match;
|
||||
using osu.Game.Screens.OnlinePlay.Components;
|
||||
using osu.Game.Screens.OnlinePlay.Lounge;
|
||||
using osu.Game.Screens.OnlinePlay.Lounge.Components;
|
||||
using osu.Game.Screens.OnlinePlay.Match;
|
||||
using osu.Game.Users;
|
||||
using osuTK;
|
||||
|
||||
namespace osu.Game.Screens.Multi
|
||||
namespace osu.Game.Screens.OnlinePlay
|
||||
{
|
||||
[Cached]
|
||||
public abstract class MultiplayerScreen : OsuScreen
|
||||
public abstract class OnlinePlayScreen : OsuScreen
|
||||
{
|
||||
public override bool CursorVisible => (screenStack.CurrentScreen as IMultiplayerSubScreen)?.CursorVisible ?? true;
|
||||
public override bool CursorVisible => (screenStack.CurrentScreen as IOnlinePlaySubScreen)?.CursorVisible ?? true;
|
||||
|
||||
// this is required due to PlayerLoader eventually being pushed to the main stack
|
||||
// while leases may be taken out by a subscreen.
|
||||
@ -67,7 +67,7 @@ namespace osu.Game.Screens.Multi
|
||||
private readonly Drawable header;
|
||||
private readonly Drawable headerBackground;
|
||||
|
||||
protected MultiplayerScreen()
|
||||
protected OnlinePlayScreen()
|
||||
{
|
||||
Anchor = Anchor.Centre;
|
||||
Origin = Anchor.Centre;
|
||||
@ -124,7 +124,7 @@ namespace osu.Game.Screens.Multi
|
||||
}
|
||||
}
|
||||
},
|
||||
screenStack = new MultiplayerSubScreenStack { RelativeSizeAxes = Axes.Both }
|
||||
screenStack = new OnlinePlaySubScreenStack { RelativeSizeAxes = Axes.Both }
|
||||
}
|
||||
},
|
||||
new Header(ScreenTitle, screenStack),
|
||||
@ -245,7 +245,7 @@ namespace osu.Game.Screens.Multi
|
||||
|
||||
public override bool OnBackButton()
|
||||
{
|
||||
if ((screenStack.CurrentScreen as IMultiplayerSubScreen)?.OnBackButton() == true)
|
||||
if ((screenStack.CurrentScreen as IOnlinePlaySubScreen)?.OnBackButton() == true)
|
||||
return true;
|
||||
|
||||
if (screenStack.CurrentScreen != null && !(screenStack.CurrentScreen is LoungeSubScreen))
|
||||
@ -295,13 +295,13 @@ namespace osu.Game.Screens.Multi
|
||||
switch (newScreen)
|
||||
{
|
||||
case LoungeSubScreen _:
|
||||
header.Delay(MultiplayerSubScreen.RESUME_TRANSITION_DELAY).ResizeHeightTo(400, MultiplayerSubScreen.APPEAR_DURATION, Easing.OutQuint);
|
||||
headerBackground.MoveToX(0, MultiplayerSubScreen.X_MOVE_DURATION, Easing.OutQuint);
|
||||
header.Delay(OnlinePlaySubScreen.RESUME_TRANSITION_DELAY).ResizeHeightTo(400, OnlinePlaySubScreen.APPEAR_DURATION, Easing.OutQuint);
|
||||
headerBackground.MoveToX(0, OnlinePlaySubScreen.X_MOVE_DURATION, Easing.OutQuint);
|
||||
break;
|
||||
|
||||
case RoomSubScreen _:
|
||||
header.ResizeHeightTo(135, MultiplayerSubScreen.APPEAR_DURATION, Easing.OutQuint);
|
||||
headerBackground.MoveToX(-MultiplayerSubScreen.X_SHIFT, MultiplayerSubScreen.X_MOVE_DURATION, Easing.OutQuint);
|
||||
header.ResizeHeightTo(135, OnlinePlaySubScreen.APPEAR_DURATION, Easing.OutQuint);
|
||||
headerBackground.MoveToX(-OnlinePlaySubScreen.X_SHIFT, OnlinePlaySubScreen.X_MOVE_DURATION, Easing.OutQuint);
|
||||
break;
|
||||
}
|
||||
|
||||
@ -338,7 +338,7 @@ namespace osu.Game.Screens.Multi
|
||||
}
|
||||
}
|
||||
|
||||
private class HeaderBackgroundSprite : MultiplayerBackgroundSprite
|
||||
private class HeaderBackgroundSprite : OnlinePlayBackgroundSprite
|
||||
{
|
||||
protected override UpdateableBeatmapBackgroundSprite CreateBackgroundSprite() => new BackgroundSprite { RelativeSizeAxes = Axes.Both };
|
||||
|
@ -5,9 +5,9 @@ using osu.Framework.Allocation;
|
||||
using osu.Framework.Graphics;
|
||||
using osu.Framework.Screens;
|
||||
|
||||
namespace osu.Game.Screens.Multi
|
||||
namespace osu.Game.Screens.OnlinePlay
|
||||
{
|
||||
public abstract class MultiplayerSubScreen : OsuScreen, IMultiplayerSubScreen
|
||||
public abstract class OnlinePlaySubScreen : OsuScreen, IOnlinePlaySubScreen
|
||||
{
|
||||
public override bool DisallowExternalBeatmapRulesetChanges => false;
|
||||
|
||||
@ -16,7 +16,7 @@ namespace osu.Game.Screens.Multi
|
||||
[Resolved(CanBeNull = true)]
|
||||
protected IRoomManager RoomManager { get; private set; }
|
||||
|
||||
protected MultiplayerSubScreen()
|
||||
protected OnlinePlaySubScreen()
|
||||
{
|
||||
Anchor = Anchor.Centre;
|
||||
Origin = Anchor.Centre;
|
@ -3,9 +3,9 @@
|
||||
|
||||
using osu.Framework.Screens;
|
||||
|
||||
namespace osu.Game.Screens.Multi
|
||||
namespace osu.Game.Screens.OnlinePlay
|
||||
{
|
||||
public class MultiplayerSubScreenStack : OsuScreenStack
|
||||
public class OnlinePlaySubScreenStack : OsuScreenStack
|
||||
{
|
||||
protected override void ScreenChanged(IScreen prev, IScreen next)
|
||||
{
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user