mirror of
https://github.com/ppy/osu.git
synced 2025-02-05 04:13:03 +08:00
Avoid having the user profile show when clicking a spectator panel
This commit is contained in:
parent
32becb6882
commit
84d854e231
@ -88,6 +88,7 @@ namespace osu.Game.Overlays.Dashboard
|
|||||||
panel.Anchor = Anchor.TopCentre;
|
panel.Anchor = Anchor.TopCentre;
|
||||||
panel.Origin = Anchor.TopCentre;
|
panel.Origin = Anchor.TopCentre;
|
||||||
panel.Width = 290;
|
panel.Width = 290;
|
||||||
|
panel.ShowProfileOnClick = false;
|
||||||
panel.Action = () => game.PerformFromScreen(s => s.Push(new Spectator(user)));
|
panel.Action = () => game.PerformFromScreen(s => s.Push(new Spectator(user)));
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
@ -22,6 +22,8 @@ namespace osu.Game.Users
|
|||||||
|
|
||||||
public new Action Action;
|
public new Action Action;
|
||||||
|
|
||||||
|
public bool ShowProfileOnClick = true;
|
||||||
|
|
||||||
protected Action ViewProfile { get; private set; }
|
protected Action ViewProfile { get; private set; }
|
||||||
|
|
||||||
protected Drawable Background { get; private set; }
|
protected Drawable Background { get; private set; }
|
||||||
@ -68,7 +70,8 @@ namespace osu.Game.Users
|
|||||||
base.Action = ViewProfile = () =>
|
base.Action = ViewProfile = () =>
|
||||||
{
|
{
|
||||||
Action?.Invoke();
|
Action?.Invoke();
|
||||||
profileOverlay?.ShowUser(User);
|
if (ShowProfileOnClick)
|
||||||
|
profileOverlay?.ShowUser(User);
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user