1
0
mirror of https://github.com/ppy/osu.git synced 2025-01-25 05:42:59 +08:00
osu-lazer/osu.Game.Rulesets.Osu/Edit/Commands/PathControlPointCommandProxy.cs
2024-10-09 21:20:07 +02:00

35 lines
1.0 KiB
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.Objects;
using osu.Game.Rulesets.Objects.Types;
using osu.Game.Screens.Edit;
using osu.Game.Screens.Edit.Commands;
using osuTK;
namespace osu.Game.Rulesets.Osu.Edit.Commands
{
public class PathControlPointCommandProxy : CommandProxy
{
public PathControlPointCommandProxy(EditorCommandHandler? commandHandler, PathControlPoint controlPoint)
: base(commandHandler)
{
ControlPoint = controlPoint;
}
public readonly PathControlPoint ControlPoint;
public Vector2 Position
{
get => ControlPoint.Position;
set => Submit(new UpdateControlPointCommand(ControlPoint) { Position = Position });
}
public PathType? Type
{
get => ControlPoint.Type;
set => Submit(new UpdateControlPointCommand(ControlPoint) { Type = Type });
}
}
}