diff --git a/osu.Game/OsuGame.cs b/osu.Game/OsuGame.cs index 62f9164fdd..4692c89048 100644 --- a/osu.Game/OsuGame.cs +++ b/osu.Game/OsuGame.cs @@ -208,6 +208,7 @@ protected override void LoadComplete() Dependencies.Cache(settings); Dependencies.Cache(social); Dependencies.Cache(chat); + Dependencies.Cache(userProfile); Dependencies.Cache(musicController); Dependencies.Cache(notificationManager); Dependencies.Cache(dialogOverlay); diff --git a/osu.Game/Users/UserPanel.cs b/osu.Game/Users/UserPanel.cs index 19ed2c3394..c0adaa19fb 100644 --- a/osu.Game/Users/UserPanel.cs +++ b/osu.Game/Users/UserPanel.cs @@ -11,6 +11,7 @@ using osu.Framework.Graphics.Sprites; using osu.Game.Graphics; using osu.Game.Graphics.Sprites; +using osu.Game.Overlays; namespace osu.Game.Users { @@ -21,6 +22,7 @@ public class UserPanel : Container private const float status_height = 30; private OsuColour colours; + private UserProfileOverlay profile; private readonly Container statusBar; private readonly Box statusBg; @@ -74,7 +76,7 @@ public UserPanel(User user) Radius = 4, }, }, - new Container + new ClickableContainer { RelativeSizeAxes = Axes.Both, Padding = new MarginPadding { Left = height - status_height - content_padding }, @@ -114,6 +116,7 @@ public UserPanel(User user) }, }, }, + Action = () => profile?.ShowUser(user) }, }, }, @@ -159,10 +162,11 @@ public UserPanel(User user) }; } - [BackgroundDependencyLoader] - private void load(OsuColour colours) + [BackgroundDependencyLoader(permitNulls:true)] + private void load(OsuColour colours, UserProfileOverlay profile) { this.colours = colours; + this.profile = profile; Status.ValueChanged += displayStatus; }