From 48fce8c4b92319e21a4e5bd3bb4d78d550654034 Mon Sep 17 00:00:00 2001 From: Lucas A Date: Sun, 8 Nov 2020 13:21:21 +0100 Subject: [PATCH] Add user activities to multi subscreens. --- osu.Game/Screens/Multi/Lounge/LoungeSubScreen.cs | 3 +++ osu.Game/Screens/Multi/Match/MatchSubScreen.cs | 2 ++ osu.Game/Users/UserActivity.cs | 13 +++++++++++++ 3 files changed, 18 insertions(+) diff --git a/osu.Game/Screens/Multi/Lounge/LoungeSubScreen.cs b/osu.Game/Screens/Multi/Lounge/LoungeSubScreen.cs index dd40f4adc6..4dc9ba549b 100644 --- a/osu.Game/Screens/Multi/Lounge/LoungeSubScreen.cs +++ b/osu.Game/Screens/Multi/Lounge/LoungeSubScreen.cs @@ -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 initialRoomsReceived = new Bindable(); private Container content; diff --git a/osu.Game/Screens/Multi/Match/MatchSubScreen.cs b/osu.Game/Screens/Multi/Match/MatchSubScreen.cs index 0d2adeb27c..2cbe215a39 100644 --- a/osu.Game/Screens/Multi/Match/MatchSubScreen.cs +++ b/osu.Game/Screens/Multi/Match/MatchSubScreen.cs @@ -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] diff --git a/osu.Game/Users/UserActivity.cs b/osu.Game/Users/UserActivity.cs index 3c9f201805..0b4fa94942 100644 --- a/osu.Game/Users/UserActivity.cs +++ b/osu.Game/Users/UserActivity.cs @@ -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; + } } } }