mirror of
https://github.com/osukey/osukey.git
synced 2025-07-01 16:29:58 +09:00
Fix slider approach circle proxies
This commit is contained in:
@ -258,7 +258,7 @@ namespace osu.Game.Rulesets.Osu.Objects.Drawables
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public Drawable ProxiedLayer => new Container(); // Todo:
|
public Drawable ProxiedLayer => HeadCircle.ProxiedLayer;
|
||||||
|
|
||||||
public override bool ReceivePositionalInputAt(Vector2 screenSpacePos) => Body.ReceivePositionalInputAt(screenSpacePos);
|
public override bool ReceivePositionalInputAt(Vector2 screenSpacePos) => Body.ReceivePositionalInputAt(screenSpacePos);
|
||||||
}
|
}
|
||||||
|
@ -57,21 +57,15 @@ namespace osu.Game.Rulesets.Osu.UI
|
|||||||
public override void Add(DrawableHitObject h)
|
public override void Add(DrawableHitObject h)
|
||||||
{
|
{
|
||||||
h.OnNewResult += onNewResult;
|
h.OnNewResult += onNewResult;
|
||||||
|
h.OnLoadComplete += d =>
|
||||||
if (h is IDrawableHitObjectWithProxiedApproach c)
|
|
||||||
{
|
{
|
||||||
var original = c.ProxiedLayer;
|
if (d is IDrawableHitObjectWithProxiedApproach c)
|
||||||
|
approachCircles.Add(c.ProxiedLayer.CreateProxy());
|
||||||
// Hitobjects only have lifetimes set on LoadComplete. For nested hitobjects (e.g. SliderHeads), this only happens when the parenting slider becomes visible.
|
};
|
||||||
// This delegation is required to make sure that the approach circles for those not-yet-loaded objects aren't added prematurely.
|
|
||||||
original.OnLoadComplete += addApproachCircleProxy;
|
|
||||||
}
|
|
||||||
|
|
||||||
base.Add(h);
|
base.Add(h);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void addApproachCircleProxy(Drawable d) => approachCircles.Add(d.CreateProxy());
|
|
||||||
|
|
||||||
public override void PostProcess()
|
public override void PostProcess()
|
||||||
{
|
{
|
||||||
connectionLayer.HitObjects = HitObjectContainer.Objects.Select(d => d.HitObject).OfType<OsuHitObject>();
|
connectionLayer.HitObjects = HitObjectContainer.Objects.Select(d => d.HitObject).OfType<OsuHitObject>();
|
||||||
|
Reference in New Issue
Block a user