From 2221797273d704a2d562467790ba4b251397a1a6 Mon Sep 17 00:00:00 2001 From: smoogipooo Date: Mon, 7 Aug 2017 14:09:49 +0900 Subject: [PATCH 1/2] Add transform sequence support to IHasAccentColour. --- osu.Game/Graphics/IHasAccentColour.cs | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/osu.Game/Graphics/IHasAccentColour.cs b/osu.Game/Graphics/IHasAccentColour.cs index ac2117c517..ca712af890 100644 --- a/osu.Game/Graphics/IHasAccentColour.cs +++ b/osu.Game/Graphics/IHasAccentColour.cs @@ -29,5 +29,16 @@ namespace osu.Game.Graphics public static TransformSequence FadeAccent(this T accentedDrawable, Color4 newColour, double duration = 0, Easing easing = Easing.None) where T : IHasAccentColour => accentedDrawable.TransformTo(nameof(accentedDrawable.AccentColour), newColour, duration, easing); + + /// + /// Tweens the accent colour of a drawable to another colour. + /// + /// The drawable to apply the accent colour to. + /// The new accent colour. + /// The tween duration. + /// The tween easing. + public static TransformSequence FadeAccent(this TransformSequence t, Color4 newColour, double duration = 0, Easing easing = Easing.None) + where T : Drawable, IHasAccentColour + => t.Append(o => o.FadeAccent(newColour, duration, easing)); } } From d0906d8232a3a0048a2e2630b44f7a7df05dfdb0 Mon Sep 17 00:00:00 2001 From: smoogipooo Date: Mon, 7 Aug 2017 14:20:18 +0900 Subject: [PATCH 2/2] Adjust xmldocs to conform to TransformableExtensions. --- osu.Game/Graphics/IHasAccentColour.cs | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) diff --git a/osu.Game/Graphics/IHasAccentColour.cs b/osu.Game/Graphics/IHasAccentColour.cs index ca712af890..0c6bf98db4 100644 --- a/osu.Game/Graphics/IHasAccentColour.cs +++ b/osu.Game/Graphics/IHasAccentColour.cs @@ -20,23 +20,17 @@ namespace osu.Game.Graphics public static class AccentedColourExtensions { /// - /// Tweens the accent colour of a drawable to another colour. + /// Smoothly adjusts over time. /// - /// The drawable to apply the accent colour to. - /// The new accent colour. - /// The tween duration. - /// The tween easing. + /// A to which further transforms can be added. public static TransformSequence FadeAccent(this T accentedDrawable, Color4 newColour, double duration = 0, Easing easing = Easing.None) where T : IHasAccentColour => accentedDrawable.TransformTo(nameof(accentedDrawable.AccentColour), newColour, duration, easing); /// - /// Tweens the accent colour of a drawable to another colour. + /// Smoothly adjusts over time. /// - /// The drawable to apply the accent colour to. - /// The new accent colour. - /// The tween duration. - /// The tween easing. + /// A to which further transforms can be added. public static TransformSequence FadeAccent(this TransformSequence t, Color4 newColour, double duration = 0, Easing easing = Easing.None) where T : Drawable, IHasAccentColour => t.Append(o => o.FadeAccent(newColour, duration, easing));