mirror of
https://github.com/ppy/osu.git
synced 2025-01-25 21:32:57 +08:00
26 lines
887 B
C#
26 lines
887 B
C#
|
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
|
||
|
// See the LICENCE file in the repository root for full licence text.
|
||
|
|
||
|
using osu.Game.Rulesets.Osu.Objects;
|
||
|
using osu.Game.Screens.Edit.Commands;
|
||
|
|
||
|
namespace osu.Game.Rulesets.Osu.Edit.Commands
|
||
|
{
|
||
|
public class SetSliderVelocityMultiplierCommand : IEditorCommand
|
||
|
{
|
||
|
public readonly Slider Slider;
|
||
|
|
||
|
public readonly double SliderVelocityMultiplier;
|
||
|
|
||
|
public SetSliderVelocityMultiplierCommand(Slider slider, double sliderVelocityMultiplier)
|
||
|
{
|
||
|
Slider = slider;
|
||
|
SliderVelocityMultiplier = sliderVelocityMultiplier;
|
||
|
}
|
||
|
|
||
|
public void Apply() => Slider.SliderVelocityMultiplier = SliderVelocityMultiplier;
|
||
|
|
||
|
public IEditorCommand CreateUndo() => new SetSliderVelocityMultiplierCommand(Slider, Slider.SliderVelocityMultiplier);
|
||
|
}
|
||
|
}
|