Add user activities to multi subscreens.

This commit is contained in:
Lucas A 2020-11-08 13:21:21 +01:00
parent 89b98b5388
commit 48fce8c4b9
3 changed files with 18 additions and 0 deletions

View File

@ -14,6 +14,7 @@ using osu.Game.Online.Multiplayer;
using osu.Game.Overlays;
using osu.Game.Screens.Multi.Lounge.Components;
using osu.Game.Screens.Multi.Match;
using osu.Game.Users;
namespace osu.Game.Screens.Multi.Lounge
{
@ -24,6 +25,8 @@ namespace osu.Game.Screens.Multi.Lounge
protected FilterControl Filter;
protected override UserActivity InitialActivity => new UserActivity.SearchingForLobby();
private readonly Bindable<bool> initialRoomsReceived = new Bindable<bool>();
private Container content;

View File

@ -21,6 +21,7 @@ using osu.Game.Screens.Multi.Play;
using osu.Game.Screens.Multi.Ranking;
using osu.Game.Screens.Play;
using osu.Game.Screens.Select;
using osu.Game.Users;
using Footer = osu.Game.Screens.Multi.Match.Components.Footer;
namespace osu.Game.Screens.Multi.Match
@ -60,6 +61,7 @@ namespace osu.Game.Screens.Multi.Match
public MatchSubScreen(Room room)
{
Title = room.RoomID.Value == null ? "New room" : room.Name.Value;
Activity.Value = new UserActivity.InLobby(room);
}
[BackgroundDependencyLoader]

View File

@ -3,6 +3,7 @@
using osu.Game.Beatmaps;
using osu.Game.Graphics;
using osu.Game.Online.Multiplayer;
using osu.Game.Rulesets;
using osuTK.Graphics;
@ -61,9 +62,21 @@ namespace osu.Game.Users
public override string Status => @"Spectating a game";
}
public class SearchingForLobby : UserActivity
{
public override string Status => @"Looking for a lobby";
}
public class InLobby : UserActivity
{
public override string Status => @"In a multiplayer lobby";
public readonly Room Room;
public InLobby(Room room)
{
Room = room;
}
}
}
}