Remove mods from workingbeatmap

This commit is contained in:
smoogipoo
2019-04-08 18:32:05 +09:00
parent ca9f172a96
commit c584967eb1
43 changed files with 147 additions and 116 deletions

View File

@ -2,6 +2,7 @@
// See the LICENCE file in the repository root for full licence text.
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using osu.Framework.Allocation;
@ -16,6 +17,7 @@ using osu.Game.Beatmaps;
using osu.Game.Graphics;
using osu.Game.Graphics.Sprites;
using osu.Game.Graphics.UserInterface;
using osu.Game.Rulesets.Mods;
using osu.Game.Screens.Menu;
using osu.Game.Screens.Play.HUD;
using osu.Game.Screens.Play.PlayerSettings;
@ -66,7 +68,7 @@ namespace osu.Game.Screens.Play
RelativeSizeAxes = Axes.Both,
Children = new Drawable[]
{
info = new BeatmapMetadataDisplay(Beatmap.Value)
info = new BeatmapMetadataDisplay(Beatmap.Value, SelectedMods.Value)
{
Alpha = 0,
Anchor = Anchor.Centre,
@ -299,6 +301,7 @@ namespace osu.Game.Screens.Play
}
private readonly WorkingBeatmap beatmap;
private readonly IEnumerable<Mod> mods;
private LoadingAnimation loading;
private Sprite backgroundSprite;
private ModDisplay modDisplay;
@ -320,9 +323,10 @@ namespace osu.Game.Screens.Play
}
}
public BeatmapMetadataDisplay(WorkingBeatmap beatmap)
public BeatmapMetadataDisplay(WorkingBeatmap beatmap, IEnumerable<Mod> mods)
{
this.beatmap = beatmap;
this.mods = mods;
}
[BackgroundDependencyLoader]
@ -403,7 +407,7 @@ namespace osu.Game.Screens.Play
Origin = Anchor.TopCentre,
AutoSizeAxes = Axes.Both,
Margin = new MarginPadding { Top = 20 },
Current = beatmap.Mods
Current = { Value = mods }
}
},
}