mirror of
https://github.com/ppy/osu.git
synced 2025-01-26 18:03:11 +08: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.Overlays;
|
||||||
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.Users;
|
||||||
|
|
||||||
namespace osu.Game.Screens.Multi.Lounge
|
namespace osu.Game.Screens.Multi.Lounge
|
||||||
{
|
{
|
||||||
@ -24,6 +25,8 @@ namespace osu.Game.Screens.Multi.Lounge
|
|||||||
|
|
||||||
protected FilterControl Filter;
|
protected FilterControl Filter;
|
||||||
|
|
||||||
|
protected override UserActivity InitialActivity => new UserActivity.SearchingForLobby();
|
||||||
|
|
||||||
private readonly Bindable<bool> initialRoomsReceived = new Bindable<bool>();
|
private readonly Bindable<bool> initialRoomsReceived = new Bindable<bool>();
|
||||||
|
|
||||||
private Container content;
|
private Container content;
|
||||||
|
@ -21,6 +21,7 @@ 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.Play;
|
||||||
using osu.Game.Screens.Select;
|
using osu.Game.Screens.Select;
|
||||||
|
using osu.Game.Users;
|
||||||
using Footer = osu.Game.Screens.Multi.Match.Components.Footer;
|
using Footer = osu.Game.Screens.Multi.Match.Components.Footer;
|
||||||
|
|
||||||
namespace osu.Game.Screens.Multi.Match
|
namespace osu.Game.Screens.Multi.Match
|
||||||
@ -60,6 +61,7 @@ namespace osu.Game.Screens.Multi.Match
|
|||||||
public MatchSubScreen(Room room)
|
public MatchSubScreen(Room room)
|
||||||
{
|
{
|
||||||
Title = room.RoomID.Value == null ? "New room" : room.Name.Value;
|
Title = room.RoomID.Value == null ? "New room" : room.Name.Value;
|
||||||
|
Activity.Value = new UserActivity.InLobby(room);
|
||||||
}
|
}
|
||||||
|
|
||||||
[BackgroundDependencyLoader]
|
[BackgroundDependencyLoader]
|
||||||
|
@ -3,6 +3,7 @@
|
|||||||
|
|
||||||
using osu.Game.Beatmaps;
|
using osu.Game.Beatmaps;
|
||||||
using osu.Game.Graphics;
|
using osu.Game.Graphics;
|
||||||
|
using osu.Game.Online.Multiplayer;
|
||||||
using osu.Game.Rulesets;
|
using osu.Game.Rulesets;
|
||||||
using osuTK.Graphics;
|
using osuTK.Graphics;
|
||||||
|
|
||||||
@ -61,9 +62,21 @@ namespace osu.Game.Users
|
|||||||
public override string Status => @"Spectating a game";
|
public override string Status => @"Spectating a game";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public class SearchingForLobby : UserActivity
|
||||||
|
{
|
||||||
|
public override string Status => @"Looking for a lobby";
|
||||||
|
}
|
||||||
|
|
||||||
public class InLobby : UserActivity
|
public class InLobby : UserActivity
|
||||||
{
|
{
|
||||||
public override string Status => @"In a multiplayer lobby";
|
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