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:
parent
78eabce35a
commit
b011edd85d
@ -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 =>
|
||||
{
|
||||
|
@ -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,
|
||||
|
Loading…
Reference in New Issue
Block a user