Fix usages of OnLoadComplete

This commit is contained in:
Dean Herbert
2019-03-17 13:43:23 +09:00
parent 8c6caf0b18
commit c496f6e56b
12 changed files with 49 additions and 23 deletions

View File

@ -57,9 +57,9 @@ namespace osu.Game.Users
var avatar = new Avatar(user)
{
RelativeSizeAxes = Axes.Both,
OnLoadComplete = d => d.FadeInFromZero(300, Easing.OutQuint),
};
avatar.OnLoadComplete += d => d.FadeInFromZero(300, Easing.OutQuint);
avatar.OpenOnClick.BindTo(OpenOnClick);
Add(displayedAvatar = new DelayedLoadWrapper(avatar));

View File

@ -59,6 +59,8 @@ namespace osu.Game.Users
FillFlowContainer infoContainer;
UserCoverBackground coverBackground;
AddInternal(content = new Container
{
RelativeSizeAxes = Axes.Both,
@ -73,13 +75,12 @@ namespace osu.Game.Users
Children = new Drawable[]
{
new DelayedLoadWrapper(new UserCoverBackground(user)
new DelayedLoadWrapper(coverBackground = new UserCoverBackground(user)
{
RelativeSizeAxes = Axes.Both,
Anchor = Anchor.Centre,
Origin = Anchor.Centre,
FillMode = FillMode.Fill,
OnLoadComplete = d => d.FadeInFromZero(400, Easing.Out)
}, 300) { RelativeSizeAxes = Axes.Both },
new Box
{
@ -181,6 +182,8 @@ namespace osu.Game.Users
}
});
coverBackground.OnLoadComplete += d => d.FadeInFromZero(400, Easing.Out);
if (user.IsSupporter)
{
infoContainer.Add(new SupporterIcon