From 84d854e23136434dcb5213abdf028f4c6ef63e6c Mon Sep 17 00:00:00 2001 From: Dean Herbert Date: Wed, 28 Oct 2020 17:23:38 +0900 Subject: [PATCH] Avoid having the user profile show when clicking a spectator panel --- osu.Game/Overlays/Dashboard/CurrentlyPlayingDisplay.cs | 1 + osu.Game/Users/UserPanel.cs | 5 ++++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/osu.Game/Overlays/Dashboard/CurrentlyPlayingDisplay.cs b/osu.Game/Overlays/Dashboard/CurrentlyPlayingDisplay.cs index 8a98614fa0..d71e582c05 100644 --- a/osu.Game/Overlays/Dashboard/CurrentlyPlayingDisplay.cs +++ b/osu.Game/Overlays/Dashboard/CurrentlyPlayingDisplay.cs @@ -88,6 +88,7 @@ namespace osu.Game.Overlays.Dashboard panel.Anchor = Anchor.TopCentre; panel.Origin = Anchor.TopCentre; panel.Width = 290; + panel.ShowProfileOnClick = false; panel.Action = () => game.PerformFromScreen(s => s.Push(new Spectator(user))); }); } diff --git a/osu.Game/Users/UserPanel.cs b/osu.Game/Users/UserPanel.cs index 57a87a713d..e97ff4287f 100644 --- a/osu.Game/Users/UserPanel.cs +++ b/osu.Game/Users/UserPanel.cs @@ -22,6 +22,8 @@ namespace osu.Game.Users public new Action Action; + public bool ShowProfileOnClick = true; + protected Action ViewProfile { get; private set; } protected Drawable Background { get; private set; } @@ -68,7 +70,8 @@ namespace osu.Game.Users base.Action = ViewProfile = () => { Action?.Invoke(); - profileOverlay?.ShowUser(User); + if (ShowProfileOnClick) + profileOverlay?.ShowUser(User); }; }