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

@ -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;
}