Skip to content

Commit

Permalink
Change rolling counters to use quicker easing types
Browse files Browse the repository at this point in the history
  • Loading branch information
peppy committed Jan 17, 2024
1 parent ee18123 commit a66ddc7
Show file tree
Hide file tree
Showing 13 changed files with 16 additions and 18 deletions.
2 changes: 1 addition & 1 deletion osu.Game/Graphics/UserInterface/PercentageCounter.cs
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ namespace osu.Game.Graphics.UserInterface
/// </summary>
public partial class PercentageCounter : RollingCounter<double>
{
protected override double RollingDuration => 750;
protected override double RollingDuration => 375;

private float epsilon => 1e-10f;

Expand Down
2 changes: 1 addition & 1 deletion osu.Game/Graphics/UserInterface/RollingCounter.cs
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ public Bindable<T> Current
/// <summary>
/// Easing for the counter rollover animation.
/// </summary>
protected virtual Easing RollingEasing => Easing.OutQuint;
protected virtual Easing RollingEasing => Easing.OutQuad;

private T displayedCount;

Expand Down
2 changes: 1 addition & 1 deletion osu.Game/Overlays/Mods/BeatmapAttributesDisplay.cs
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,7 @@ private void updateCollapsedState()

private partial class BPMDisplay : RollingCounter<double>
{
protected override double RollingDuration => 500;
protected override double RollingDuration => 250;

protected override LocalisableString FormatCount(double count) => count.ToLocalisableString("0 BPM");

Expand Down
2 changes: 1 addition & 1 deletion osu.Game/Overlays/Mods/ScoreMultiplierDisplay.cs
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ protected override void LoadComplete()

private partial class EffectCounter : RollingCounter<double>
{
protected override double RollingDuration => 500;
protected override double RollingDuration => 250;

protected override LocalisableString FormatCount(double count) => ModUtils.FormatScoreMultiplier(count);

Expand Down
2 changes: 1 addition & 1 deletion osu.Game/Overlays/Mods/VerticalAttributeDisplay.cs
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ public enum ModEffect

private partial class EffectCounter : RollingCounter<double>
{
protected override double RollingDuration => 500;
protected override double RollingDuration => 250;

protected override LocalisableString FormatCount(double count) => count.ToLocalisableString("0.0#");

Expand Down
3 changes: 1 addition & 2 deletions osu.Game/Screens/Play/HUD/ArgonAccuracyCounter.cs
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,7 @@ namespace osu.Game.Screens.Play.HUD
{
public partial class ArgonAccuracyCounter : GameplayAccuracyCounter, ISerialisableDrawable
{
protected override double RollingDuration => 500;
protected override Easing RollingEasing => Easing.OutQuint;
protected override double RollingDuration => 250;

[SettingSource("Wireframe opacity", "Controls the opacity of the wire frames behind the digits.")]
public BindableFloat WireframeOpacity { get; } = new BindableFloat(0.25f)
Expand Down
3 changes: 1 addition & 2 deletions osu.Game/Screens/Play/HUD/ArgonComboCounter.cs
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,7 @@ public partial class ArgonComboCounter : ComboCounter
{
private ArgonCounterTextComponent text = null!;

protected override double RollingDuration => 500;
protected override Easing RollingEasing => Easing.OutQuint;
protected override double RollingDuration => 250;

[SettingSource("Wireframe opacity", "Controls the opacity of the wire frames behind the digits.")]
public BindableFloat WireframeOpacity { get; } = new BindableFloat(0.25f)
Expand Down
3 changes: 1 addition & 2 deletions osu.Game/Screens/Play/HUD/ArgonScoreCounter.cs
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,7 @@ public partial class ArgonScoreCounter : GameplayScoreCounter, ISerialisableDraw
{
private ArgonScoreTextComponent scoreText = null!;

protected override double RollingDuration => 500;
protected override Easing RollingEasing => Easing.OutQuint;
protected override double RollingDuration => 250;

[SettingSource("Wireframe opacity", "Controls the opacity of the wire frames behind the digits.")]
public BindableFloat WireframeOpacity { get; } = new BindableFloat(0.25f)
Expand Down
2 changes: 1 addition & 1 deletion osu.Game/Screens/Play/HUD/BPMCounter.cs
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ namespace osu.Game.Screens.Play.HUD
{
public partial class BPMCounter : RollingCounter<double>, ISerialisableDrawable
{
protected override double RollingDuration => 750;
protected override double RollingDuration => 375;

[Resolved]
private IBindable<WorkingBeatmap> beatmap { get; set; } = null!;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ public partial class ClicksPerSecondCounter : RollingCounter<int>, ISerialisable
[Resolved]
private ClicksPerSecondController controller { get; set; } = null!;

protected override double RollingDuration => 350;
protected override double RollingDuration => 175;

public bool UsesFixedAnchor { get; set; }

Expand Down
2 changes: 1 addition & 1 deletion osu.Game/Screens/Play/HUD/PerformancePointsCounter.cs
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ public partial class PerformancePointsCounter : RollingCounter<int>, ISerialisab

protected override bool IsRollingProportional => true;

protected override double RollingDuration => 1000;
protected override double RollingDuration => 500;

private const float alpha_when_invalid = 0.3f;

Expand Down
2 changes: 1 addition & 1 deletion osu.Game/Screens/Play/HUD/UnstableRateCounter.cs
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ public partial class UnstableRateCounter : RollingCounter<int>, ISerialisableDra
{
public bool UsesFixedAnchor { get; set; }

protected override double RollingDuration => 750;
protected override double RollingDuration => 375;

private const float alpha_when_invalid = 0.3f;
private readonly Bindable<bool> valid = new Bindable<bool>();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,9 +44,10 @@ public override void Appear()

private partial class Counter : RollingCounter<double>
{
protected override double RollingDuration => AccuracyCircle.ACCURACY_TRANSFORM_DURATION;

protected override Easing RollingEasing => AccuracyCircle.ACCURACY_TRANSFORM_EASING;
// FormatAccuracy doesn't round, which means if we use the OutPow10 easing the number will stick 0.01% short for some time.
// To avoid that let's use a shorter easing which looks roughly the same.
protected override double RollingDuration => AccuracyCircle.ACCURACY_TRANSFORM_DURATION / 2;
protected override Easing RollingEasing => Easing.OutQuad;

protected override LocalisableString FormatCount(double count) => count.FormatAccuracy();

Expand Down

0 comments on commit a66ddc7

Please sign in to comment.