Make sliders respond to scale changes

This commit is contained in:
smoogipoo
2018-10-26 15:33:21 +09:00
parent a9f1484e8b
commit 660cd24750
3 changed files with 6 additions and 3 deletions

View File

@ -28,6 +28,7 @@ namespace osu.Game.Rulesets.Osu.Edit.Masks.SliderMasks.Components
}; };
slider.PositionChanged += _ => updatePosition(); slider.PositionChanged += _ => updatePosition();
slider.ScaleChanged += _ => body.PathWidth = slider.Scale * 64;
} }
[BackgroundDependencyLoader] [BackgroundDependencyLoader]

View File

@ -12,9 +12,6 @@ using OpenTK;
namespace osu.Game.Rulesets.Osu.Edit.Masks.SliderMasks.Components namespace osu.Game.Rulesets.Osu.Edit.Masks.SliderMasks.Components
{ {
/// <summary>
/// Todo: Move this out of SliderPlacementMask...
/// </summary>
public class SliderControlPoint : CompositeDrawable public class SliderControlPoint : CompositeDrawable
{ {
private readonly Path path; private readonly Path path;

View File

@ -85,6 +85,11 @@ namespace osu.Game.Rulesets.Osu.Objects.Drawables
} }
HitObject.PositionChanged += _ => Position = HitObject.StackedPosition; HitObject.PositionChanged += _ => Position = HitObject.StackedPosition;
HitObject.ScaleChanged += _ =>
{
Body.PathWidth = HitObject.Scale * 64;
Ball.Scale = new Vector2(HitObject.Scale);
};
} }
public override Color4 AccentColour public override Color4 AccentColour