mirror of
https://github.com/ppy/osu
synced 2024-12-12 01:48:49 +00:00
Always place spinners behind hitcircles/sliders
This commit is contained in:
parent
b582e9caa4
commit
24bc9b33b1
@ -23,7 +23,8 @@ namespace osu.Game.Rulesets.Osu.UI
|
|||||||
{
|
{
|
||||||
public class OsuPlayfield : Playfield
|
public class OsuPlayfield : Playfield
|
||||||
{
|
{
|
||||||
private readonly ApproachCircleProxyContainer approachCircles;
|
private readonly ProxyContainer approachCircles;
|
||||||
|
private readonly ProxyContainer spinnerProxies;
|
||||||
private readonly JudgementContainer<DrawableOsuJudgement> judgementLayer;
|
private readonly JudgementContainer<DrawableOsuJudgement> judgementLayer;
|
||||||
private readonly FollowPointRenderer followPoints;
|
private readonly FollowPointRenderer followPoints;
|
||||||
private readonly OrderedHitPolicy hitPolicy;
|
private readonly OrderedHitPolicy hitPolicy;
|
||||||
@ -38,6 +39,10 @@ namespace osu.Game.Rulesets.Osu.UI
|
|||||||
{
|
{
|
||||||
InternalChildren = new Drawable[]
|
InternalChildren = new Drawable[]
|
||||||
{
|
{
|
||||||
|
spinnerProxies = new ProxyContainer
|
||||||
|
{
|
||||||
|
RelativeSizeAxes = Axes.Both
|
||||||
|
},
|
||||||
followPoints = new FollowPointRenderer
|
followPoints = new FollowPointRenderer
|
||||||
{
|
{
|
||||||
RelativeSizeAxes = Axes.Both,
|
RelativeSizeAxes = Axes.Both,
|
||||||
@ -54,7 +59,7 @@ namespace osu.Game.Rulesets.Osu.UI
|
|||||||
{
|
{
|
||||||
Child = HitObjectContainer,
|
Child = HitObjectContainer,
|
||||||
},
|
},
|
||||||
approachCircles = new ApproachCircleProxyContainer
|
approachCircles = new ProxyContainer
|
||||||
{
|
{
|
||||||
RelativeSizeAxes = Axes.Both,
|
RelativeSizeAxes = Axes.Both,
|
||||||
Depth = -1,
|
Depth = -1,
|
||||||
@ -76,6 +81,9 @@ namespace osu.Game.Rulesets.Osu.UI
|
|||||||
h.OnNewResult += onNewResult;
|
h.OnNewResult += onNewResult;
|
||||||
h.OnLoadComplete += d =>
|
h.OnLoadComplete += d =>
|
||||||
{
|
{
|
||||||
|
if (d is DrawableSpinner)
|
||||||
|
spinnerProxies.Add(d.CreateProxy());
|
||||||
|
|
||||||
if (d is IDrawableHitObjectWithProxiedApproach c)
|
if (d is IDrawableHitObjectWithProxiedApproach c)
|
||||||
approachCircles.Add(c.ProxiedLayer.CreateProxy());
|
approachCircles.Add(c.ProxiedLayer.CreateProxy());
|
||||||
};
|
};
|
||||||
@ -113,9 +121,9 @@ namespace osu.Game.Rulesets.Osu.UI
|
|||||||
|
|
||||||
public override bool ReceivePositionalInputAt(Vector2 screenSpacePos) => HitObjectContainer.ReceivePositionalInputAt(screenSpacePos);
|
public override bool ReceivePositionalInputAt(Vector2 screenSpacePos) => HitObjectContainer.ReceivePositionalInputAt(screenSpacePos);
|
||||||
|
|
||||||
private class ApproachCircleProxyContainer : LifetimeManagementContainer
|
private class ProxyContainer : LifetimeManagementContainer
|
||||||
{
|
{
|
||||||
public void Add(Drawable approachCircleProxy) => AddInternal(approachCircleProxy);
|
public void Add(Drawable proxy) => AddInternal(proxy);
|
||||||
}
|
}
|
||||||
|
|
||||||
private class DrawableJudgementPool : DrawablePool<DrawableOsuJudgement>
|
private class DrawableJudgementPool : DrawablePool<DrawableOsuJudgement>
|
||||||
|
Loading…
Reference in New Issue
Block a user