1
0
mirror of https://github.com/ppy/osu.git synced 2025-02-15 09:42:57 +08:00

Merge pull request #4473 from peppy/update-framework

Update framework
This commit is contained in:
Dan Balasescu 2019-03-18 12:06:36 +09:00 committed by GitHub
commit 9cabd12c45
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
14 changed files with 52 additions and 26 deletions

View File

@ -60,7 +60,7 @@ namespace osu.Game.Rulesets.Catch.UI
if (lastPlateableFruit.IsLoaded) if (lastPlateableFruit.IsLoaded)
action(); action();
else else
lastPlateableFruit.OnLoadComplete = _ => action(); lastPlateableFruit.OnLoadComplete += _ => action();
} }
if (result.IsHit && fruit.CanBePlated) if (result.IsHit && fruit.CanBePlated)

View File

@ -51,7 +51,7 @@ namespace osu.Game.Beatmaps.Drawables
drawable.Anchor = Anchor.Centre; drawable.Anchor = Anchor.Centre;
drawable.Origin = Anchor.Centre; drawable.Origin = Anchor.Centre;
drawable.FillMode = FillMode.Fill; drawable.FillMode = FillMode.Fill;
drawable.OnLoadComplete = d => d.FadeInFromZero(400); drawable.OnLoadComplete += d => d.FadeInFromZero(400);
return drawable; return drawable;
} }

View File

@ -67,16 +67,19 @@ namespace osu.Game.Beatmaps.Drawables
if (beatmapSet != null) if (beatmapSet != null)
{ {
BeatmapSetCover cover;
Add(displayedCover = new DelayedLoadWrapper( Add(displayedCover = new DelayedLoadWrapper(
new BeatmapSetCover(beatmapSet, coverType) cover = new BeatmapSetCover(beatmapSet, coverType)
{ {
Anchor = Anchor.Centre, Anchor = Anchor.Centre,
Origin = Anchor.Centre, Origin = Anchor.Centre,
RelativeSizeAxes = Axes.Both, RelativeSizeAxes = Axes.Both,
FillMode = FillMode.Fill, FillMode = FillMode.Fill,
OnLoadComplete = d => d.FadeInFromZero(400, Easing.Out),
}) })
); );
cover.OnLoadComplete += d => d.FadeInFromZero(400, Easing.Out);
} }
} }
} }

View File

@ -64,6 +64,8 @@ namespace osu.Game.Online.Leaderboards
statisticsLabels = GetStatistics(score).Select(s => new ScoreComponentLabel(s)).ToList(); statisticsLabels = GetStatistics(score).Select(s => new ScoreComponentLabel(s)).ToList();
Avatar innerAvatar;
Children = new Drawable[] Children = new Drawable[]
{ {
new Container new Container
@ -109,12 +111,11 @@ namespace osu.Game.Online.Leaderboards
Children = new[] Children = new[]
{ {
avatar = new DelayedLoadWrapper( avatar = new DelayedLoadWrapper(
new Avatar(user) innerAvatar = new Avatar(user)
{ {
RelativeSizeAxes = Axes.Both, RelativeSizeAxes = Axes.Both,
CornerRadius = corner_radius, CornerRadius = corner_radius,
Masking = true, Masking = true,
OnLoadComplete = d => d.FadeInFromZero(200),
EdgeEffect = new EdgeEffectParameters EdgeEffect = new EdgeEffectParameters
{ {
Type = EdgeEffectType.Shadow, Type = EdgeEffectType.Shadow,
@ -214,6 +215,8 @@ namespace osu.Game.Online.Leaderboards
}, },
}, },
}; };
innerAvatar.OnLoadComplete += d => d.FadeInFromZero(200);
} }
public override void Show() public override void Show()

View File

@ -28,6 +28,8 @@ namespace osu.Game.Overlays.Chat.Tabs
if (value.Type != ChannelType.PM) if (value.Type != ChannelType.PM)
throw new ArgumentException("Argument value needs to have the targettype user!"); throw new ArgumentException("Argument value needs to have the targettype user!");
Avatar avatar;
AddRange(new Drawable[] AddRange(new Drawable[]
{ {
new Container new Container
@ -49,11 +51,10 @@ namespace osu.Game.Overlays.Chat.Tabs
Anchor = Anchor.Centre, Anchor = Anchor.Centre,
Origin = Anchor.Centre, Origin = Anchor.Centre,
Masking = true, Masking = true,
Child = new DelayedLoadWrapper(new Avatar(value.Users.First()) Child = new DelayedLoadWrapper(avatar = new Avatar(value.Users.First())
{ {
RelativeSizeAxes = Axes.Both, RelativeSizeAxes = Axes.Both,
OpenOnClick = { Value = false }, OpenOnClick = { Value = false },
OnLoadComplete = d => d.FadeInFromZero(300, Easing.OutQuint),
}) })
{ {
RelativeSizeAxes = Axes.Both, 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; Text.X = ChatOverlay.TAB_AREA_HEIGHT;
TextBold.X = ChatOverlay.TAB_AREA_HEIGHT; TextBold.X = ChatOverlay.TAB_AREA_HEIGHT;
} }

View File

@ -109,7 +109,7 @@ namespace osu.Game.Overlays.MedalSplash
s.Font = s.Font.With(size: 16); s.Font = s.Font.With(size: 16);
}); });
medalContainer.OnLoadComplete = d => medalContainer.OnLoadComplete += d =>
{ {
unlocked.Position = new Vector2(0f, medalContainer.DrawSize.Y / 2 + 10); unlocked.Position = new Vector2(0f, medalContainer.DrawSize.Y / 2 + 10);
infoFlow.Position = new Vector2(0f, unlocked.Position.Y + 90); infoFlow.Position = new Vector2(0f, unlocked.Position.Y + 90);

View File

@ -335,9 +335,12 @@ namespace osu.Game.Overlays.Profile
Anchor = Anchor.Centre, Anchor = Anchor.Centre,
Origin = Anchor.Centre, Origin = Anchor.Centre,
FillMode = FillMode.Fill, FillMode = FillMode.Fill,
OnLoadComplete = d => d.FadeInFromZero(200),
Depth = float.MaxValue, Depth = float.MaxValue,
}, coverContainer.Add); }, background =>
{
coverContainer.Add(background);
background.FadeInFromZero(200);
});
if (user.IsSupporter) if (user.IsSupporter)
SupporterTag.Show(); SupporterTag.Show();

View File

@ -52,12 +52,18 @@ namespace osu.Game.Screens.Multi.Match.Components
Participants.BindValueChanged(participants => Participants.BindValueChanged(participants =>
{ {
usersFlow.Children = participants.NewValue.Select(u => new UserPanel(u) usersFlow.Children = participants.NewValue.Select(u =>
{ {
Anchor = Anchor.TopCentre, var panel = new UserPanel(u)
Origin = Anchor.TopCentre, {
Width = 300, Anchor = Anchor.TopCentre,
OnLoadComplete = d => d.FadeInFromZero(60), Origin = Anchor.TopCentre,
Width = 300,
};
panel.OnLoadComplete += d => d.FadeInFromZero(60);
return panel;
}).ToList(); }).ToList();
}, true); }, true);
} }

View File

@ -577,7 +577,7 @@ namespace osu.Game.Screens.Select
else else
{ {
float y = currentY; float y = currentY;
d.OnLoadComplete = _ => performMove(y, setY); d.OnLoadComplete += _ => performMove(y, setY);
} }
break; break;

View File

@ -49,11 +49,16 @@ namespace osu.Game.Screens.Select.Carousel
Children = new Drawable[] Children = new Drawable[]
{ {
new DelayedLoadUnloadWrapper(() => new DelayedLoadUnloadWrapper(() =>
new PanelBackground(manager.GetWorkingBeatmap(beatmapSet.Beatmaps.FirstOrDefault())) {
var background = new PanelBackground(manager.GetWorkingBeatmap(beatmapSet.Beatmaps.FirstOrDefault()))
{ {
RelativeSizeAxes = Axes.Both, 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 new FillFlowContainer
{ {

View File

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

View File

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

View File

@ -16,7 +16,7 @@
<PackageReference Include="Microsoft.EntityFrameworkCore.Sqlite.Core" Version="2.2.1" /> <PackageReference Include="Microsoft.EntityFrameworkCore.Sqlite.Core" Version="2.2.1" />
<PackageReference Include="Newtonsoft.Json" Version="12.0.1" /> <PackageReference Include="Newtonsoft.Json" Version="12.0.1" />
<PackageReference Include="ppy.osu.Game.Resources" Version="2019.128.0" /> <PackageReference Include="ppy.osu.Game.Resources" Version="2019.128.0" />
<PackageReference Include="ppy.osu.Framework" Version="2019.313.0" /> <PackageReference Include="ppy.osu.Framework" Version="2019.315.0" />
<PackageReference Include="SharpCompress" Version="0.22.0" /> <PackageReference Include="SharpCompress" Version="0.22.0" />
<PackageReference Include="NUnit" Version="3.11.0" /> <PackageReference Include="NUnit" Version="3.11.0" />
<PackageReference Include="SharpRaven" Version="2.4.0" /> <PackageReference Include="SharpRaven" Version="2.4.0" />

View File

@ -105,8 +105,8 @@
<PackageReference Include="Microsoft.EntityFrameworkCore.Sqlite.Core" Version="2.2.1" /> <PackageReference Include="Microsoft.EntityFrameworkCore.Sqlite.Core" Version="2.2.1" />
<PackageReference Include="Newtonsoft.Json" Version="12.0.1" /> <PackageReference Include="Newtonsoft.Json" Version="12.0.1" />
<PackageReference Include="ppy.osu.Game.Resources" Version="2019.128.0" /> <PackageReference Include="ppy.osu.Game.Resources" Version="2019.128.0" />
<PackageReference Include="ppy.osu.Framework" Version="2019.313.0" /> <PackageReference Include="ppy.osu.Framework" Version="2019.315.0" />
<PackageReference Include="ppy.osu.Framework.iOS" Version="2019.313.0" /> <PackageReference Include="ppy.osu.Framework.iOS" Version="2019.315.0" />
<PackageReference Include="SharpCompress" Version="0.22.0" /> <PackageReference Include="SharpCompress" Version="0.22.0" />
<PackageReference Include="NUnit" Version="3.11.0" /> <PackageReference Include="NUnit" Version="3.11.0" />
<PackageReference Include="SharpRaven" Version="2.4.0" /> <PackageReference Include="SharpRaven" Version="2.4.0" />