mirror of
https://github.com/ppy/osu
synced 2024-12-23 07:15:46 +00:00
Add user activities to multi subscreens.
This commit is contained in:
parent
89b98b5388
commit
48fce8c4b9
@ -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;
|
||||
|
@ -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]
|
||||
|
@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user