mirror of
https://github.com/ppy/osu.git
synced 2024-11-06 06:57:39 +08:00
Fix usages of OnLoadComplete
This commit is contained in:
parent
8c6caf0b18
commit
c496f6e56b
@ -60,7 +60,7 @@ namespace osu.Game.Rulesets.Catch.UI
|
||||
if (lastPlateableFruit.IsLoaded)
|
||||
action();
|
||||
else
|
||||
lastPlateableFruit.OnLoadComplete = _ => action();
|
||||
lastPlateableFruit.OnLoadComplete += _ => action();
|
||||
}
|
||||
|
||||
if (result.IsHit && fruit.CanBePlated)
|
||||
|
@ -51,7 +51,7 @@ namespace osu.Game.Beatmaps.Drawables
|
||||
drawable.Anchor = Anchor.Centre;
|
||||
drawable.Origin = Anchor.Centre;
|
||||
drawable.FillMode = FillMode.Fill;
|
||||
drawable.OnLoadComplete = d => d.FadeInFromZero(400);
|
||||
drawable.OnLoadComplete += d => d.FadeInFromZero(400);
|
||||
|
||||
return drawable;
|
||||
}
|
||||
|
@ -67,16 +67,19 @@ namespace osu.Game.Beatmaps.Drawables
|
||||
|
||||
if (beatmapSet != null)
|
||||
{
|
||||
BeatmapSetCover cover;
|
||||
|
||||
Add(displayedCover = new DelayedLoadWrapper(
|
||||
new BeatmapSetCover(beatmapSet, coverType)
|
||||
cover = new BeatmapSetCover(beatmapSet, coverType)
|
||||
{
|
||||
Anchor = Anchor.Centre,
|
||||
Origin = Anchor.Centre,
|
||||
RelativeSizeAxes = Axes.Both,
|
||||
FillMode = FillMode.Fill,
|
||||
OnLoadComplete = d => d.FadeInFromZero(400, Easing.Out),
|
||||
})
|
||||
);
|
||||
|
||||
cover.OnLoadComplete += d => d.FadeInFromZero(400, Easing.Out);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -64,6 +64,8 @@ namespace osu.Game.Online.Leaderboards
|
||||
|
||||
statisticsLabels = GetStatistics(score).Select(s => new ScoreComponentLabel(s)).ToList();
|
||||
|
||||
Avatar innerAvatar;
|
||||
|
||||
Children = new Drawable[]
|
||||
{
|
||||
new Container
|
||||
@ -109,12 +111,11 @@ namespace osu.Game.Online.Leaderboards
|
||||
Children = new[]
|
||||
{
|
||||
avatar = new DelayedLoadWrapper(
|
||||
new Avatar(user)
|
||||
innerAvatar = new Avatar(user)
|
||||
{
|
||||
RelativeSizeAxes = Axes.Both,
|
||||
CornerRadius = corner_radius,
|
||||
Masking = true,
|
||||
OnLoadComplete = d => d.FadeInFromZero(200),
|
||||
EdgeEffect = new EdgeEffectParameters
|
||||
{
|
||||
Type = EdgeEffectType.Shadow,
|
||||
@ -214,6 +215,8 @@ namespace osu.Game.Online.Leaderboards
|
||||
},
|
||||
},
|
||||
};
|
||||
|
||||
innerAvatar.OnLoadComplete += d => d.FadeInFromZero(200);
|
||||
}
|
||||
|
||||
public override void Show()
|
||||
|
@ -28,6 +28,8 @@ namespace osu.Game.Overlays.Chat.Tabs
|
||||
if (value.Type != ChannelType.PM)
|
||||
throw new ArgumentException("Argument value needs to have the targettype user!");
|
||||
|
||||
Avatar avatar;
|
||||
|
||||
AddRange(new Drawable[]
|
||||
{
|
||||
new Container
|
||||
@ -49,11 +51,10 @@ namespace osu.Game.Overlays.Chat.Tabs
|
||||
Anchor = Anchor.Centre,
|
||||
Origin = Anchor.Centre,
|
||||
Masking = true,
|
||||
Child = new DelayedLoadWrapper(new Avatar(value.Users.First())
|
||||
Child = new DelayedLoadWrapper(avatar = new Avatar(value.Users.First())
|
||||
{
|
||||
RelativeSizeAxes = Axes.Both,
|
||||
OpenOnClick = { Value = false },
|
||||
OnLoadComplete = d => d.FadeInFromZero(300, Easing.OutQuint),
|
||||
})
|
||||
{
|
||||
RelativeSizeAxes = Axes.Both,
|
||||
@ -63,6 +64,8 @@ namespace osu.Game.Overlays.Chat.Tabs
|
||||
},
|
||||
});
|
||||
|
||||
avatar.OnLoadComplete += d => d.FadeInFromZero(300, Easing.OutQuint);
|
||||
|
||||
Text.X = ChatOverlay.TAB_AREA_HEIGHT;
|
||||
TextBold.X = ChatOverlay.TAB_AREA_HEIGHT;
|
||||
}
|
||||
|
@ -109,7 +109,7 @@ namespace osu.Game.Overlays.MedalSplash
|
||||
s.Font = s.Font.With(size: 16);
|
||||
});
|
||||
|
||||
medalContainer.OnLoadComplete = d =>
|
||||
medalContainer.OnLoadComplete += d =>
|
||||
{
|
||||
unlocked.Position = new Vector2(0f, medalContainer.DrawSize.Y / 2 + 10);
|
||||
infoFlow.Position = new Vector2(0f, unlocked.Position.Y + 90);
|
||||
|
@ -335,9 +335,12 @@ namespace osu.Game.Overlays.Profile
|
||||
Anchor = Anchor.Centre,
|
||||
Origin = Anchor.Centre,
|
||||
FillMode = FillMode.Fill,
|
||||
OnLoadComplete = d => d.FadeInFromZero(200),
|
||||
Depth = float.MaxValue,
|
||||
}, coverContainer.Add);
|
||||
}, background =>
|
||||
{
|
||||
coverContainer.Add(background);
|
||||
background.FadeInFromZero(200);
|
||||
});
|
||||
|
||||
if (user.IsSupporter)
|
||||
SupporterTag.Show();
|
||||
|
@ -52,12 +52,18 @@ namespace osu.Game.Screens.Multi.Match.Components
|
||||
|
||||
Participants.BindValueChanged(participants =>
|
||||
{
|
||||
usersFlow.Children = participants.NewValue.Select(u => new UserPanel(u)
|
||||
usersFlow.Children = participants.NewValue.Select(u =>
|
||||
{
|
||||
Anchor = Anchor.TopCentre,
|
||||
Origin = Anchor.TopCentre,
|
||||
Width = 300,
|
||||
OnLoadComplete = d => d.FadeInFromZero(60),
|
||||
var panel = new UserPanel(u)
|
||||
{
|
||||
Anchor = Anchor.TopCentre,
|
||||
Origin = Anchor.TopCentre,
|
||||
Width = 300,
|
||||
};
|
||||
|
||||
panel.OnLoadComplete += d => d.FadeInFromZero(60);
|
||||
|
||||
return panel;
|
||||
}).ToList();
|
||||
}, true);
|
||||
}
|
||||
|
@ -577,7 +577,7 @@ namespace osu.Game.Screens.Select
|
||||
else
|
||||
{
|
||||
float y = currentY;
|
||||
d.OnLoadComplete = _ => performMove(y, setY);
|
||||
d.OnLoadComplete += _ => performMove(y, setY);
|
||||
}
|
||||
|
||||
break;
|
||||
|
@ -49,11 +49,16 @@ namespace osu.Game.Screens.Select.Carousel
|
||||
Children = new Drawable[]
|
||||
{
|
||||
new DelayedLoadUnloadWrapper(() =>
|
||||
new PanelBackground(manager.GetWorkingBeatmap(beatmapSet.Beatmaps.FirstOrDefault()))
|
||||
{
|
||||
var background = new PanelBackground(manager.GetWorkingBeatmap(beatmapSet.Beatmaps.FirstOrDefault()))
|
||||
{
|
||||
RelativeSizeAxes = Axes.Both,
|
||||
OnLoadComplete = d => d.FadeInFromZero(1000, Easing.OutQuint),
|
||||
}, 300, 5000
|
||||
};
|
||||
|
||||
background.OnLoadComplete += d => d.FadeInFromZero(1000, Easing.OutQuint);
|
||||
|
||||
return background;
|
||||
}, 300, 5000
|
||||
),
|
||||
new FillFlowContainer
|
||||
{
|
||||
|
@ -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));
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user