mirror of
https://github.com/ppy/osu.git
synced 2025-01-26 17:53:53 +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>
|
/// </summary>
|
||||||
public Playfield Playfield => playfield.Value;
|
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>
|
/// <summary>
|
||||||
/// The cursor provided by this <see cref="RulesetContainer"/>. May be null if no cursor is provided.
|
/// The cursor provided by this <see cref="RulesetContainer"/>. May be null if no cursor is provided.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@ -88,6 +94,12 @@ namespace osu.Game.Rulesets.UI
|
|||||||
{
|
{
|
||||||
Ruleset = ruleset;
|
Ruleset = ruleset;
|
||||||
playfield = new Lazy<Playfield>(CreatePlayfield);
|
playfield = new Lazy<Playfield>(CreatePlayfield);
|
||||||
|
overlays = new Container
|
||||||
|
{
|
||||||
|
RelativeSizeAxes = Axes.Both,
|
||||||
|
Width = 1,
|
||||||
|
Height = 1
|
||||||
|
};
|
||||||
|
|
||||||
IsPaused.ValueChanged += paused =>
|
IsPaused.ValueChanged += paused =>
|
||||||
{
|
{
|
||||||
|
@ -178,6 +178,7 @@ namespace osu.Game.Screens.Play
|
|||||||
RelativeSizeAxes = Axes.Both,
|
RelativeSizeAxes = Axes.Both,
|
||||||
Child = RulesetContainer
|
Child = RulesetContainer
|
||||||
},
|
},
|
||||||
|
RulesetContainer.Overlays,
|
||||||
new BreakOverlay(beatmap.BeatmapInfo.LetterboxInBreaks, ScoreProcessor)
|
new BreakOverlay(beatmap.BeatmapInfo.LetterboxInBreaks, ScoreProcessor)
|
||||||
{
|
{
|
||||||
Anchor = Anchor.Centre,
|
Anchor = Anchor.Centre,
|
||||||
|
Loading…
Reference in New Issue
Block a user