mirror of
https://github.com/ppy/osu.git
synced 2024-12-13 08:32:57 +08:00
SliderBody's Size getter updates size to the body/path's Size
This commit is contained in:
parent
3a608aa815
commit
c3a2a1361d
@ -61,10 +61,20 @@ namespace osu.Game.Rulesets.Osu.Edit.Blueprints.Sliders.Components
|
|||||||
body.SetVertices(vertices);
|
body.SetVertices(vertices);
|
||||||
}
|
}
|
||||||
|
|
||||||
Size = body.Size;
|
|
||||||
OriginPosition = body.PathOffset;
|
OriginPosition = body.PathOffset;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public override Vector2 Size
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
if (base.Size != body.Size)
|
||||||
|
Size = body.Size;
|
||||||
|
return base.Size;
|
||||||
|
}
|
||||||
|
set => base.Size = value;
|
||||||
|
}
|
||||||
|
|
||||||
public void RecyclePath() => body.RecyclePath();
|
public void RecyclePath() => body.RecyclePath();
|
||||||
|
|
||||||
public override bool ReceivePositionalInputAt(Vector2 screenSpacePos) => body.ReceivePositionalInputAt(screenSpacePos);
|
public override bool ReceivePositionalInputAt(Vector2 screenSpacePos) => body.ReceivePositionalInputAt(screenSpacePos);
|
||||||
|
@ -11,10 +11,17 @@ namespace osu.Game.Rulesets.Osu.Skinning.Default
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
public partial class ManualSliderBody : SliderBody
|
public partial class ManualSliderBody : SliderBody
|
||||||
{
|
{
|
||||||
public new void SetVertices(IReadOnlyList<Vector2> vertices)
|
public new void SetVertices(IReadOnlyList<Vector2> vertices) => base.SetVertices(vertices);
|
||||||
|
|
||||||
|
public override Vector2 Size
|
||||||
{
|
{
|
||||||
base.SetVertices(vertices);
|
get
|
||||||
Size = Path.Size;
|
{
|
||||||
|
if (base.Size != Path.Size)
|
||||||
|
Size = Path.Size;
|
||||||
|
return base.Size;
|
||||||
|
}
|
||||||
|
set => base.Size = value;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user