1
0
mirror of https://github.com/ppy/osu.git synced 2024-09-21 14:07:25 +08:00

Move to ctor

This commit is contained in:
Dan Balasescu 2024-05-23 23:45:04 +09:00
parent f17f70dca7
commit b1c7afd75b
No known key found for this signature in database
2 changed files with 9 additions and 10 deletions

View File

@ -28,21 +28,22 @@ namespace osu.Game.Rulesets.Osu.Edit.Blueprints.Sliders.Components
public SliderBodyPiece()
{
InternalChild = body = new ManualSliderBody
{
AccentColour = Color4.Transparent
};
AutoSizeAxes = Axes.Both;
// SliderSelectionBlueprint relies on calling ReceivePositionalInputAt on this drawable to determine whether selection should occur.
// Without AlwaysPresent, a movement in a parent container (ie. the editor composer area resizing) could cause incorrect input handling.
AlwaysPresent = true;
InternalChild = body = new ManualSliderBody
{
AccentColour = Color4.Transparent
};
}
[BackgroundDependencyLoader]
private void load(OsuColour colours)
{
body.BorderColour = colours.Yellow;
AutoSizeAxes = Axes.Both;
}
private int? lastVersion;

View File

@ -2,7 +2,6 @@
// See the LICENCE file in the repository root for full licence text.
using System.Collections.Generic;
using osu.Framework.Allocation;
using osu.Framework.Graphics;
using osuTK;
@ -13,12 +12,11 @@ namespace osu.Game.Rulesets.Osu.Skinning.Default
/// </summary>
public partial class ManualSliderBody : SliderBody
{
public new void SetVertices(IReadOnlyList<Vector2> vertices) => base.SetVertices(vertices);
[BackgroundDependencyLoader]
private void load()
public ManualSliderBody()
{
AutoSizeAxes = Axes.Both;
}
public new void SetVertices(IReadOnlyList<Vector2> vertices) => base.SetVertices(vertices);
}
}