1
0
mirror of https://github.com/ppy/osu.git synced 2024-12-14 20:22:55 +08:00

Add xmldoc to SelectionRotationHandler

This commit is contained in:
Bartłomiej Dach 2023-07-23 20:09:31 +02:00
parent aec3ca250c
commit a201152b04
No known key found for this signature in database

View File

@ -16,6 +16,18 @@ namespace osu.Game.Screens.Edit.Compose.Components
/// </summary>
public Bindable<bool> CanRotate { get; private set; } = new BindableBool();
/// <summary>
/// Performs a single, instant, atomic rotation operation.
/// </summary>
/// <remarks>
/// This method is intended to be used in atomic contexts (such as when pressing a single button).
/// For continuous operations, see the <see cref="Begin"/>-<see cref="Update"/>-<see cref="Commit"/> flow.
/// </remarks>
/// <param name="rotation">Rotation to apply in degrees.</param>
/// <param name="origin">
/// The origin point to rotate around.
/// If the default <see langword="null"/> value is supplied, a sane implementation-defined default will be used.
/// </param>
public void Rotate(float rotation, Vector2? origin = null)
{
Begin();
@ -23,14 +35,48 @@ namespace osu.Game.Screens.Edit.Compose.Components
Commit();
}
/// <summary>
/// Begins a continuous rotation operation.
/// </summary>
/// <remarks>
/// This flow is intended to be used when a rotation operation is made incrementally (such as when dragging a rotation handle or slider).
/// For instantaneous, atomic operations, use the convenience <see cref="Rotate"/> method.
/// </remarks>
public virtual void Begin()
{
}
/// <summary>
/// Updates a continuous rotation operation.
/// Must be preceded by a <see cref="Begin"/> call.
/// </summary>
/// <remarks>
/// <para>
/// This flow is intended to be used when a rotation operation is made incrementally (such as when dragging a rotation handle or slider).
/// As such, the values of <paramref name="rotation"/> and <paramref name="origin"/> supplied should be relative to the state of the objects being rotated
/// when <see cref="Begin"/> was called, rather than instantaneous deltas.
/// </para>
/// <para>
/// For instantaneous, atomic operations, use the convenience <see cref="Rotate"/> method.
/// </para>
/// </remarks>
/// <param name="rotation">Rotation to apply in degrees.</param>
/// <param name="origin">
/// The origin point to rotate around.
/// If the default <see langword="null"/> value is supplied, a sane implementation-defined default will be used.
/// </param>
public virtual void Update(float rotation, Vector2? origin = null)
{
}
/// <summary>
/// Ends a continuous rotation operation.
/// Must be preceded by a <see cref="Begin"/> call.
/// </summary>
/// <remarks>
/// This flow is intended to be used when a rotation operation is made incrementally (such as when dragging a rotation handle or slider).
/// For instantaneous, atomic operations, use the convenience <see cref="Rotate"/> method.
/// </remarks>
public virtual void Commit()
{
}