mirror of
https://github.com/ppy/osu.git
synced 2025-01-12 17:43:05 +08:00
IAccented -> IHasAccentColour.
This commit is contained in:
parent
591ecc0ef4
commit
43c306d658
@ -19,7 +19,7 @@ namespace osu.Game.Modes.Taiko.Objects.Drawable.Pieces
|
||||
/// a rounded (_[-Width-]_) figure such that a regular "circle" is the result of a parent with Width = 0.
|
||||
/// </para>
|
||||
/// </summary>
|
||||
public class CirclePiece : Container, IAccented
|
||||
public class CirclePiece : Container, IHasAccentColour
|
||||
{
|
||||
public const float SYMBOL_SIZE = TaikoHitObject.CIRCLE_RADIUS * 2f * 0.45f;
|
||||
public const float SYMBOL_BORDER = 8;
|
||||
|
@ -12,12 +12,12 @@ namespace osu.Game.Graphics
|
||||
/// The accent colour is used to colorize various objects inside a drawable
|
||||
/// without colorizing the drawable itself.
|
||||
/// </summary>
|
||||
public interface IAccented : IDrawable
|
||||
public interface IHasAccentColour : IDrawable
|
||||
{
|
||||
Color4 AccentColour { get; set; }
|
||||
}
|
||||
|
||||
public static class AccentedExtensions
|
||||
public static class AccentedColourExtensions
|
||||
{
|
||||
/// <summary>
|
||||
/// Tweens the accent colour of a drawable to another colour.
|
||||
@ -28,7 +28,7 @@ namespace osu.Game.Graphics
|
||||
/// <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, IAccented
|
||||
where TDrawable : Drawable, IHasAccentColour
|
||||
{
|
||||
drawable.TransformTo(drawable.AccentColour, newColour, duration, easing, new TransformAccent());
|
||||
}
|
@ -29,7 +29,7 @@ namespace osu.Game.Graphics.Transforms
|
||||
{
|
||||
base.Apply(d);
|
||||
|
||||
var accented = d as IAccented;
|
||||
var accented = d as IHasAccentColour;
|
||||
if (accented != null)
|
||||
accented.AccentColour = CurrentValue;
|
||||
}
|
||||
|
@ -82,7 +82,7 @@
|
||||
<Compile Include="Graphics\Backgrounds\Triangles.cs" />
|
||||
<Compile Include="Graphics\Cursor\CursorTrail.cs" />
|
||||
<Compile Include="Graphics\Cursor\GameplayCursor.cs" />
|
||||
<Compile Include="Graphics\IAccented.cs" />
|
||||
<Compile Include="Graphics\IHasAccentColour.cs" />
|
||||
<Compile Include="Graphics\Sprites\OsuSpriteText.cs" />
|
||||
<Compile Include="Graphics\Transforms\TransformAccent.cs" />
|
||||
<Compile Include="Graphics\UserInterface\BackButton.cs" />
|
||||
|
Loading…
Reference in New Issue
Block a user