From 2fee7276ae5b137d4fd63ef0995dd25c8e3e6971 Mon Sep 17 00:00:00 2001 From: smoogipoo Date: Tue, 5 Mar 2019 17:58:05 +0900 Subject: [PATCH] Combine creation + assignment --- osu.Game/Screens/Play/PlayerLoader.cs | 20 ++++++++------------ 1 file changed, 8 insertions(+), 12 deletions(-) diff --git a/osu.Game/Screens/Play/PlayerLoader.cs b/osu.Game/Screens/Play/PlayerLoader.cs index d94ea3b229..9061c38b33 100644 --- a/osu.Game/Screens/Play/PlayerLoader.cs +++ b/osu.Game/Screens/Play/PlayerLoader.cs @@ -299,14 +299,6 @@ public MetadataLine(string left, string right) private Sprite backgroundSprite; private ModDisplay modDisplay; - protected ModDisplay CreateModsContainer() => new ModDisplay - { - Anchor = Anchor.TopCentre, - Origin = Anchor.TopCentre, - AutoSizeAxes = Axes.Both, - Margin = new MarginPadding { Top = 20 }, - }; - public bool Loading { set @@ -333,9 +325,6 @@ public BeatmapMetadataDisplay(WorkingBeatmap beatmap) private void load() { var metadata = beatmap?.BeatmapInfo?.Metadata ?? new BeatmapMetadata(); - modDisplay = CreateModsContainer(); - - modDisplay.Current.BindTo(beatmap?.Mods); AutoSizeAxes = Axes.Both; Children = new Drawable[] @@ -404,7 +393,14 @@ private void load() Origin = Anchor.TopCentre, Anchor = Anchor.TopCentre, }, - modDisplay + new ModDisplay + { + Anchor = Anchor.TopCentre, + Origin = Anchor.TopCentre, + AutoSizeAxes = Axes.Both, + Margin = new MarginPadding { Top = 20 }, + Current = beatmap.Mods + } }, } };