mirror of
https://github.com/osukey/osukey.git
synced 2025-07-01 16:29:58 +09:00
Move click action out of user panel
This commit is contained in:
@ -20,10 +20,12 @@ namespace osu.Game.Users
|
||||
{
|
||||
public readonly User User;
|
||||
|
||||
/// <summary>
|
||||
/// Perform an action in addition to showing the user's profile.
|
||||
/// This should be used to perform auxiliary tasks and not as a primary action for clicking a user panel (to maintain a consistent UX).
|
||||
/// </summary>
|
||||
public new Action Action;
|
||||
|
||||
public bool ShowProfileOnClick = true;
|
||||
|
||||
protected Action ViewProfile { get; private set; }
|
||||
|
||||
protected Drawable Background { get; private set; }
|
||||
@ -70,8 +72,7 @@ namespace osu.Game.Users
|
||||
base.Action = ViewProfile = () =>
|
||||
{
|
||||
Action?.Invoke();
|
||||
if (ShowProfileOnClick)
|
||||
profileOverlay?.ShowUser(User);
|
||||
profileOverlay?.ShowUser(User);
|
||||
};
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user