diff --git a/osu.Game.Rulesets.Osu/Mods/OsuModBlinds.cs b/osu.Game.Rulesets.Osu/Mods/OsuModBlinds.cs index ec2839b4ad..f6c2c1215d 100644 --- a/osu.Game.Rulesets.Osu/Mods/OsuModBlinds.cs +++ b/osu.Game.Rulesets.Osu/Mods/OsuModBlinds.cs @@ -35,8 +35,8 @@ namespace osu.Game.Rulesets.Osu.Mods public void ApplyToRulesetContainer(RulesetContainer rulesetContainer) { - bool hasEasy = rulesetContainer.ActiveMods.Any(m => m is ModEasy); - bool hasHardrock = rulesetContainer.ActiveMods.Any(m => m is ModHardRock); + bool hasEasy = rulesetContainer.Mods.Any(m => m is ModEasy); + bool hasHardrock = rulesetContainer.Mods.Any(m => m is ModHardRock); rulesetContainer.Overlays.Add(blinds = new DrawableOsuBlinds(rulesetContainer.Playfield.HitObjectContainer, hasEasy, hasHardrock, rulesetContainer.Beatmap)); } diff --git a/osu.Game/Rulesets/UI/RulesetContainer.cs b/osu.Game/Rulesets/UI/RulesetContainer.cs index 67bcb7581f..22d4eee5e4 100644 --- a/osu.Game/Rulesets/UI/RulesetContainer.cs +++ b/osu.Game/Rulesets/UI/RulesetContainer.cs @@ -71,7 +71,7 @@ namespace osu.Game.Rulesets.UI /// /// Place to put drawables above hit objects but below UI. /// - public readonly Container Overlays; + public Container Overlays { get; protected set; } /// /// The cursor provided by this . May be null if no cursor is provided. @@ -92,12 +92,6 @@ namespace osu.Game.Rulesets.UI { Ruleset = ruleset; playfield = new Lazy(CreatePlayfield); - Overlays = new Container - { - RelativeSizeAxes = Axes.Both, - Width = 1, - Height = 1 - }; IsPaused.ValueChanged += paused => { @@ -215,7 +209,7 @@ namespace osu.Game.Rulesets.UI /// /// The mods which are to be applied. /// - protected IEnumerable Mods; + public IEnumerable Mods { get; protected set; } /// /// The this was created with. @@ -226,7 +220,6 @@ namespace osu.Game.Rulesets.UI protected override Container Content => content; private Container content; - private IEnumerable mods; /// /// Whether to assume the beatmap passed into this is for the current ruleset. @@ -256,17 +249,24 @@ namespace osu.Game.Rulesets.UI [BackgroundDependencyLoader] private void load(OsuConfigManager config) { - KeyBindingInputManager.Add(content = new Container + KeyBindingInputManager.Children = new Drawable[] { - RelativeSizeAxes = Axes.Both, - }); - - AddInternal(KeyBindingInputManager); - KeyBindingInputManager.Add(Playfield); + content = new Container + { + RelativeSizeAxes = Axes.Both, + }, + Playfield + }; if (Cursor != null) KeyBindingInputManager.Add(Cursor); + InternalChildren = new Drawable[] + { + KeyBindingInputManager, + Overlays = new Container { RelativeSizeAxes = Axes.Both } + }; + // Apply mods applyRulesetMods(Mods, config); @@ -324,11 +324,6 @@ namespace osu.Game.Rulesets.UI mod.ApplyToDrawableHitObjects(Playfield.HitObjectContainer.Objects); } - /// - /// Returns the currently selected mods for this ruleset container. - /// - public IEnumerable ActiveMods { get => Mods; } - /// /// Creates and adds the visual representation of a to this . /// diff --git a/osu.Game/Screens/Play/Player.cs b/osu.Game/Screens/Play/Player.cs index fd2c94e814..19b49b099c 100644 --- a/osu.Game/Screens/Play/Player.cs +++ b/osu.Game/Screens/Play/Player.cs @@ -184,7 +184,6 @@ namespace osu.Game.Screens.Play RelativeSizeAxes = Axes.Both, Child = RulesetContainer }, - RulesetContainer.Overlays, new BreakOverlay(beatmap.BeatmapInfo.LetterboxInBreaks, ScoreProcessor) { Anchor = Anchor.Centre,