1
0
mirror of https://github.com/ppy/osu.git synced 2025-01-26 18:52:55 +08:00

Avoid having the user profile show when clicking a spectator panel

This commit is contained in:
Dean Herbert 2020-10-28 17:23:38 +09:00
parent 32becb6882
commit 84d854e231
2 changed files with 5 additions and 1 deletions

View File

@ -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)));
});
}

View File

@ -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);
};
}