mirror of https://github.com/ppy/osu
Show profile when click on user panel.
This commit is contained in:
parent
43569d69a7
commit
3883f4a746
|
@ -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);
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue