Centralise method of disabling playfield judgements

This commit is contained in:
smoogipoo
2018-07-20 17:04:33 +09:00
parent 2af5d795fe
commit 1139f0dbf2
9 changed files with 20 additions and 25 deletions

View File

@ -5,6 +5,7 @@ using System.Collections.Generic;
using osu.Framework.Graphics;
using osu.Game.Rulesets.Objects.Drawables;
using osu.Framework.Allocation;
using osu.Framework.Configuration;
namespace osu.Game.Rulesets.UI
{
@ -21,6 +22,11 @@ namespace osu.Game.Rulesets.UI
public IReadOnlyList<Playfield> NestedPlayfields => nestedPlayfields;
private List<Playfield> nestedPlayfields;
/// <summary>
/// Whether judgements should be displayed by this and and all nested <see cref="Playfield"/>s.
/// </summary>
public readonly BindableBool DisplayJudgements = new BindableBool(true);
/// <summary>
/// A container for keeping track of DrawableHitObjects.
/// </summary>
@ -73,6 +79,8 @@ namespace osu.Game.Rulesets.UI
nestedPlayfields = new List<Playfield>();
nestedPlayfields.Add(otherPlayfield);
otherPlayfield.DisplayJudgements.BindTo(DisplayJudgements);
}
/// <summary>