mirror of
https://github.com/ppy/osu.git
synced 2024-11-11 13:37:25 +08:00
Change origin of nested objects inside JuiceStream to fix visibility issues
This commit is contained in:
parent
9ad519e5a5
commit
8ec2c35c4f
@ -6,6 +6,7 @@ using osu.Framework.Graphics;
|
||||
using osu.Framework.Graphics.Containers;
|
||||
using osu.Game.Rulesets.Objects;
|
||||
using osu.Game.Rulesets.Objects.Drawables;
|
||||
using osuTK;
|
||||
|
||||
namespace osu.Game.Rulesets.Catch.Objects.Drawables
|
||||
{
|
||||
@ -14,11 +15,13 @@ namespace osu.Game.Rulesets.Catch.Objects.Drawables
|
||||
private readonly Func<CatchHitObject, DrawableHitObject<CatchHitObject>> createDrawableRepresentation;
|
||||
private readonly Container dropletContainer;
|
||||
|
||||
public override Vector2 OriginPosition => base.OriginPosition - new Vector2(0, CatchHitObject.OBJECT_RADIUS);
|
||||
|
||||
public DrawableJuiceStream(JuiceStream s, Func<CatchHitObject, DrawableHitObject<CatchHitObject>> createDrawableRepresentation = null)
|
||||
: base(s)
|
||||
{
|
||||
this.createDrawableRepresentation = createDrawableRepresentation;
|
||||
RelativeSizeAxes = Axes.Both;
|
||||
RelativeSizeAxes = Axes.X;
|
||||
Origin = Anchor.BottomLeft;
|
||||
X = 0;
|
||||
|
||||
@ -27,6 +30,8 @@ namespace osu.Game.Rulesets.Catch.Objects.Drawables
|
||||
|
||||
protected override void AddNestedHitObject(DrawableHitObject hitObject)
|
||||
{
|
||||
hitObject.Origin = Anchor.BottomCentre;
|
||||
|
||||
base.AddNestedHitObject(hitObject);
|
||||
dropletContainer.Add(hitObject);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user