From a1ce7e9a950470eed6488387a04d2914d11cc18a Mon Sep 17 00:00:00 2001 From: LeNitrous Date: Sat, 26 Jan 2019 17:14:45 +0800 Subject: [PATCH] add ModDisplay on PlayerLoader --- osu.Game/Screens/Play/PlayerLoader.cs | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/osu.Game/Screens/Play/PlayerLoader.cs b/osu.Game/Screens/Play/PlayerLoader.cs index be3fdc8d14..24a2b90b0d 100644 --- a/osu.Game/Screens/Play/PlayerLoader.cs +++ b/osu.Game/Screens/Play/PlayerLoader.cs @@ -17,6 +17,7 @@ using osu.Game.Graphics; using osu.Game.Graphics.Sprites; using osu.Game.Graphics.UserInterface; using osu.Game.Screens.Menu; +using osu.Game.Screens.Play.HUD; using osu.Game.Screens.Play.PlayerSettings; using osuTK; using osuTK.Graphics; @@ -275,6 +276,15 @@ namespace osu.Game.Screens.Play private readonly WorkingBeatmap beatmap; private LoadingAnimation loading; private Sprite backgroundSprite; + private ModDisplay ModDisplay; + + protected virtual ModDisplay CreateModsContainer() => new ModDisplay + { + Anchor = Anchor.TopCentre, + Origin = Anchor.TopCentre, + AutoSizeAxes = Axes.Both, + Margin = new MarginPadding { Top = 20 }, + }; public bool Loading { @@ -302,6 +312,8 @@ namespace osu.Game.Screens.Play private void load() { var metadata = beatmap?.BeatmapInfo?.Metadata ?? new BeatmapMetadata(); + ModDisplay = CreateModsContainer(); + ModDisplay.Current.BindTo(beatmap.Mods); AutoSizeAxes = Axes.Both; Children = new Drawable[] @@ -373,6 +385,7 @@ namespace osu.Game.Screens.Play Origin = Anchor.TopCentre, Anchor = Anchor.TopCentre, }, + ModDisplay }, } };