mirror of
https://github.com/ppy/osu.git
synced 2024-12-05 09:42:54 +08:00
Add SetPathTypeCommand
This commit is contained in:
parent
8aa5385e3f
commit
57c12191e5
22
osu.Game/Screens/Edit/Commands/Proxies/SetPathTypeCommand.cs
Normal file
22
osu.Game/Screens/Edit/Commands/Proxies/SetPathTypeCommand.cs
Normal file
@ -0,0 +1,22 @@
|
||||
// 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.Objects;
|
||||
using osu.Game.Rulesets.Objects.Types;
|
||||
|
||||
namespace osu.Game.Screens.Edit.Commands
|
||||
{
|
||||
public class SetPathTypeCommand : PropertyChangeCommand<PathControlPoint, PathType?>
|
||||
{
|
||||
public SetPathTypeCommand(PathControlPoint target, PathType? value)
|
||||
: base(target, value)
|
||||
{
|
||||
}
|
||||
|
||||
protected override PathType? ReadValue(PathControlPoint target) => target.Type;
|
||||
|
||||
protected override void WriteValue(PathControlPoint target, PathType? value) => target.Type = value;
|
||||
|
||||
protected override SetPathTypeCommand CreateInstance(PathControlPoint target, PathType? value) => new SetPathTypeCommand(target, value);
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user