1
0
mirror of https://github.com/ppy/osu.git synced 2025-01-12 19:42:55 +08:00

added Overlays container to RulesetContainer

this is required for mods such as flashlight which always want to draw
objects above hitcircles. If just adding children to a RulesetContainer
the hit circles would always be above the added children (no matter
the Depth).
This commit is contained in:
WebFreak001 2018-08-05 13:12:31 +02:00
parent 78eabce35a
commit b011edd85d
2 changed files with 13 additions and 0 deletions

View File

@ -69,6 +69,12 @@ namespace osu.Game.Rulesets.UI
/// </summary>
public Playfield Playfield => playfield.Value;
private readonly Container overlays;
/// <summary>
/// Place to put drawables above hit objects but below UI.
/// </summary>
public Container Overlays => overlays;
/// <summary>
/// The cursor provided by this <see cref="RulesetContainer"/>. May be null if no cursor is provided.
/// </summary>
@ -88,6 +94,12 @@ namespace osu.Game.Rulesets.UI
{
Ruleset = ruleset;
playfield = new Lazy<Playfield>(CreatePlayfield);
overlays = new Container
{
RelativeSizeAxes = Axes.Both,
Width = 1,
Height = 1
};
IsPaused.ValueChanged += paused =>
{

View File

@ -178,6 +178,7 @@ namespace osu.Game.Screens.Play
RelativeSizeAxes = Axes.Both,
Child = RulesetContainer
},
RulesetContainer.Overlays,
new BreakOverlay(beatmap.BeatmapInfo.LetterboxInBreaks, ScoreProcessor)
{
Anchor = Anchor.Centre,