mirror of
https://github.com/ppy/osu.git
synced 2024-11-13 16:13:34 +08:00
Changed Size to be handled by AutoSizeAxes
This commit is contained in:
parent
c3a2a1361d
commit
f17f70dca7
@ -3,6 +3,7 @@
|
||||
|
||||
using System.Collections.Generic;
|
||||
using osu.Framework.Allocation;
|
||||
using osu.Framework.Graphics;
|
||||
using osu.Game.Graphics;
|
||||
using osu.Game.Rulesets.Osu.Objects;
|
||||
using osu.Game.Rulesets.Osu.Skinning.Default;
|
||||
@ -41,6 +42,7 @@ namespace osu.Game.Rulesets.Osu.Edit.Blueprints.Sliders.Components
|
||||
private void load(OsuColour colours)
|
||||
{
|
||||
body.BorderColour = colours.Yellow;
|
||||
AutoSizeAxes = Axes.Both;
|
||||
}
|
||||
|
||||
private int? lastVersion;
|
||||
@ -64,17 +66,6 @@ namespace osu.Game.Rulesets.Osu.Edit.Blueprints.Sliders.Components
|
||||
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 override bool ReceivePositionalInputAt(Vector2 screenSpacePos) => body.ReceivePositionalInputAt(screenSpacePos);
|
||||
|
@ -2,6 +2,8 @@
|
||||
// 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;
|
||||
|
||||
namespace osu.Game.Rulesets.Osu.Skinning.Default
|
||||
@ -13,15 +15,10 @@ namespace osu.Game.Rulesets.Osu.Skinning.Default
|
||||
{
|
||||
public new void SetVertices(IReadOnlyList<Vector2> vertices) => base.SetVertices(vertices);
|
||||
|
||||
public override Vector2 Size
|
||||
[BackgroundDependencyLoader]
|
||||
private void load()
|
||||
{
|
||||
get
|
||||
{
|
||||
if (base.Size != Path.Size)
|
||||
Size = Path.Size;
|
||||
return base.Size;
|
||||
}
|
||||
set => base.Size = value;
|
||||
AutoSizeAxes = Axes.Both;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user