mirror of
https://github.com/osukey/osukey.git
synced 2025-08-04 23:24:04 +09:00
More changes in-line with framework changes.
This commit is contained in:
@ -30,7 +30,7 @@ namespace osu.Game.Graphics
|
||||
public static void FadeAccent<T>(this T accentedDrawable, Color4 newColour, double duration = 0, EasingTypes easing = EasingTypes.None)
|
||||
where T : Transformable<Drawable>, IHasAccentColour
|
||||
{
|
||||
accentedDrawable.TransformTo(() => accentedDrawable.AccentColour, newColour, duration, easing, new TransformAccent());
|
||||
accentedDrawable.TransformTo(newColour, duration, easing, new TransformAccent());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -13,7 +13,7 @@ namespace osu.Game.Graphics.Transforms
|
||||
/// <summary>
|
||||
/// Current value of the transformed colour in linear colour space.
|
||||
/// </summary>
|
||||
public override Color4 CurrentValue
|
||||
public virtual Color4 CurrentValue
|
||||
{
|
||||
get
|
||||
{
|
||||
@ -25,13 +25,7 @@ namespace osu.Game.Graphics.Transforms
|
||||
}
|
||||
}
|
||||
|
||||
public override void Apply(Drawable d)
|
||||
{
|
||||
base.Apply(d);
|
||||
|
||||
var accented = d as IHasAccentColour;
|
||||
if (accented != null)
|
||||
accented.AccentColour = CurrentValue;
|
||||
}
|
||||
public override void Apply(Drawable d) => ((IHasAccentColour)d).AccentColour = CurrentValue;
|
||||
public override void ReadIntoStartValue(Drawable d) => StartValue = ((IHasAccentColour)d).AccentColour;
|
||||
}
|
||||
}
|
||||
|
@ -47,7 +47,7 @@ namespace osu.Game.Graphics.UserInterface
|
||||
|
||||
protected class TransformAccuracy : Transform<double, Drawable>
|
||||
{
|
||||
public override double CurrentValue
|
||||
public virtual double CurrentValue
|
||||
{
|
||||
get
|
||||
{
|
||||
@ -59,11 +59,8 @@ namespace osu.Game.Graphics.UserInterface
|
||||
}
|
||||
}
|
||||
|
||||
public override void Apply(Drawable d)
|
||||
{
|
||||
base.Apply(d);
|
||||
((PercentageCounter)d).DisplayedCount = CurrentValue;
|
||||
}
|
||||
public override void Apply(Drawable d) => ((PercentageCounter)d).DisplayedCount = CurrentValue;
|
||||
public override void ReadIntoStartValue(Drawable d) => StartValue = ((PercentageCounter)d).DisplayedCount;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -210,7 +210,6 @@ namespace osu.Game.Graphics.UserInterface
|
||||
|
||||
transform.StartTime = TransformStartTime;
|
||||
transform.EndTime = TransformStartTime + rollingTotalDuration;
|
||||
transform.StartValue = currentValue;
|
||||
transform.EndValue = newValue;
|
||||
transform.Easing = RollingEasing;
|
||||
|
||||
|
@ -58,7 +58,7 @@ namespace osu.Game.Graphics.UserInterface
|
||||
|
||||
protected class TransformScore : Transform<double, Drawable>
|
||||
{
|
||||
public override double CurrentValue
|
||||
public virtual double CurrentValue
|
||||
{
|
||||
get
|
||||
{
|
||||
@ -70,11 +70,8 @@ namespace osu.Game.Graphics.UserInterface
|
||||
}
|
||||
}
|
||||
|
||||
public override void Apply(Drawable d)
|
||||
{
|
||||
base.Apply(d);
|
||||
((ScoreCounter)d).DisplayedCount = CurrentValue;
|
||||
}
|
||||
public override void Apply(Drawable d) => ((ScoreCounter)d).DisplayedCount = CurrentValue;
|
||||
public override void ReadIntoStartValue(Drawable d) => StartValue = ((ScoreCounter)d).DisplayedCount;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -39,7 +39,7 @@ namespace osu.Game.Graphics.UserInterface
|
||||
|
||||
private class TransformCounterCount : Transform<int, Drawable>
|
||||
{
|
||||
public override int CurrentValue
|
||||
public virtual int CurrentValue
|
||||
{
|
||||
get
|
||||
{
|
||||
@ -51,11 +51,8 @@ namespace osu.Game.Graphics.UserInterface
|
||||
}
|
||||
}
|
||||
|
||||
public override void Apply(Drawable d)
|
||||
{
|
||||
base.Apply(d);
|
||||
((SimpleComboCounter)d).DisplayedCount = CurrentValue;
|
||||
}
|
||||
public override void Apply(Drawable d) => ((SimpleComboCounter)d).DisplayedCount = CurrentValue;
|
||||
public override void ReadIntoStartValue(Drawable d) => StartValue = ((SimpleComboCounter)d).DisplayedCount;
|
||||
}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user