1
0
mirror of https://github.com/ppy/osu.git synced 2025-01-12 19:42:55 +08:00

Show profile when click on user panel.

This commit is contained in:
Huo Yaoyuan 2017-06-16 16:23:20 +08:00
parent 43569d69a7
commit 3883f4a746
2 changed files with 8 additions and 3 deletions

View File

@ -208,6 +208,7 @@ namespace osu.Game
Dependencies.Cache(settings);
Dependencies.Cache(social);
Dependencies.Cache(chat);
Dependencies.Cache(userProfile);
Dependencies.Cache(musicController);
Dependencies.Cache(notificationManager);
Dependencies.Cache(dialogOverlay);

View File

@ -11,6 +11,7 @@ using osu.Framework.Graphics.Containers;
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 @@ namespace osu.Game.Users
private const float status_height = 30;
private OsuColour colours;
private UserProfileOverlay profile;
private readonly Container statusBar;
private readonly Box statusBg;
@ -74,7 +76,7 @@ namespace osu.Game.Users
Radius = 4,
},
},
new Container
new ClickableContainer
{
RelativeSizeAxes = Axes.Both,
Padding = new MarginPadding { Left = height - status_height - content_padding },
@ -114,6 +116,7 @@ namespace osu.Game.Users
},
},
},
Action = () => profile?.ShowUser(user)
},
},
},
@ -159,10 +162,11 @@ namespace osu.Game.Users
};
}
[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;
}