1
0
mirror of https://github.com/ppy/osu.git synced 2025-01-26 23:43:03 +08:00

Don't need Drawable type.

This commit is contained in:
smoogipooo 2017-03-31 15:05:14 +09:00
parent 43c306d658
commit a48224bd6d
2 changed files with 4 additions and 6 deletions

@ -1 +1 @@
Subproject commit 591b799f95a47e5da893c82d024e01311c9c37c6
Subproject commit 57821bd61c7676c2fd9e8ff3ea314ec81c1eef41

View File

@ -22,15 +22,13 @@ namespace osu.Game.Graphics
/// <summary>
/// Tweens the accent colour of a drawable to another colour.
/// </summary>
/// <typeparam name="TDrawable">The type of drawable.</typeparam>
/// <param name="drawable">The drawable to apply the accent colour to.</param>
/// <param name="accentedDrawable">The drawable to apply the accent colour to.</param>
/// <param name="newColour">The new accent colour.</param>
/// <param name="duration">The tween duration.</param>
/// <param name="easing">The tween easing.</param>
public static void FadeAccent<TDrawable>(this TDrawable drawable, Color4 newColour, double duration = 0, EasingTypes easing = EasingTypes.None)
where TDrawable : Drawable, IHasAccentColour
public static void FadeAccent(this IHasAccentColour accentedDrawable, Color4 newColour, double duration = 0, EasingTypes easing = EasingTypes.None)
{
drawable.TransformTo(drawable.AccentColour, newColour, duration, easing, new TransformAccent());
accentedDrawable.TransformTo(accentedDrawable.AccentColour, newColour, duration, easing, new TransformAccent());
}
}
}