mirror of
https://github.com/ppy/osu
synced 2024-12-15 11:25:29 +00:00
Merge pull request #8430 from peppy/remove-unused-transform-helpers
Remove unused text transform helpers
This commit is contained in:
commit
ebe3cf2966
@ -1,9 +1,7 @@
|
||||
// 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.Framework.Graphics;
|
||||
using osu.Framework.Graphics.Sprites;
|
||||
using osu.Framework.Graphics.Transforms;
|
||||
|
||||
namespace osu.Game.Graphics.Sprites
|
||||
{
|
||||
@ -15,23 +13,4 @@ namespace osu.Game.Graphics.Sprites
|
||||
Font = OsuFont.Default;
|
||||
}
|
||||
}
|
||||
|
||||
public static class OsuSpriteTextTransformExtensions
|
||||
{
|
||||
/// <summary>
|
||||
/// Sets <see cref="SpriteText.Text">Text</see> to a new value after a duration.
|
||||
/// </summary>
|
||||
/// <returns>A <see cref="TransformSequence{T}"/> to which further transforms can be added.</returns>
|
||||
public static TransformSequence<T> TransformTextTo<T>(this T spriteText, string newText, double duration = 0, Easing easing = Easing.None)
|
||||
where T : OsuSpriteText
|
||||
=> spriteText.TransformTo(nameof(OsuSpriteText.Text), newText, duration, easing);
|
||||
|
||||
/// <summary>
|
||||
/// Sets <see cref="SpriteText.Text">Text</see> to a new value after a duration.
|
||||
/// </summary>
|
||||
/// <returns>A <see cref="TransformSequence{T}"/> to which further transforms can be added.</returns>
|
||||
public static TransformSequence<T> TransformTextTo<T>(this TransformSequence<T> t, string newText, double duration = 0, Easing easing = Easing.None)
|
||||
where T : OsuSpriteText
|
||||
=> t.Append(o => o.TransformTextTo(newText, duration, easing));
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user