Use .With() wherever possible

This commit is contained in:
smoogipoo 2019-04-17 17:24:09 +09:00
parent c145ce2d00
commit 12b6bc48bd
2 changed files with 6 additions and 6 deletions

View File

@ -101,11 +101,10 @@ public ButtonSystem()
{
VisibleState = ButtonSystemState.Play,
},
logoTrackingContainer.LogoFacade
logoTrackingContainer.LogoFacade.With(d => d.Scale = new Vector2(0.74f))
});
buttonArea.Flow.CentreTarget = logoTrackingContainer.LogoFacade;
logoTrackingContainer.LogoFacade.Scale = new Vector2(0.74f);
}
[Resolved(CanBeNull = true)]

View File

@ -351,9 +351,6 @@ private void load()
{
var metadata = beatmap.BeatmapInfo?.Metadata ?? new BeatmapMetadata();
facade.Anchor = Anchor.TopCentre;
facade.Origin = Anchor.TopCentre;
AutoSizeAxes = Axes.Both;
Children = new Drawable[]
{
@ -365,7 +362,11 @@ private void load()
Direction = FillDirection.Vertical,
Children = new[]
{
facade,
facade.With(d =>
{
d.Anchor = Anchor.TopCentre;
d.Origin = Anchor.TopCentre;
}),
new OsuSpriteText
{
Text = new LocalisedString((metadata.TitleUnicode, metadata.Title)),