From 965e542eaf295a86ad2f2ead62cfc764f8fab683 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Adonais=20Romero=20Gonz=C3=A1lez?= Date: Fri, 7 Oct 2016 16:14:35 -0500 Subject: [PATCH] Line wrapping --- .../UserInterface/AlternativeComboCounter.cs | 6 ++-- .../UserInterface/CatchComboCounter.cs | 3 +- .../Graphics/UserInterface/RollingCounter.cs | 34 +++++++++++-------- .../UserInterface/StandardComboCounter.cs | 7 +--- .../Graphics/UserInterface/ULongCounter.cs | 2 +- 5 files changed, 27 insertions(+), 25 deletions(-) diff --git a/osu.Game/Graphics/UserInterface/AlternativeComboCounter.cs b/osu.Game/Graphics/UserInterface/AlternativeComboCounter.cs index 3bd63ad641..5afe23fce7 100644 --- a/osu.Game/Graphics/UserInterface/AlternativeComboCounter.cs +++ b/osu.Game/Graphics/UserInterface/AlternativeComboCounter.cs @@ -13,14 +13,14 @@ using System.Threading.Tasks; namespace osu.Game.Graphics.UserInterface { /// - /// Allows tint and vertical scaling animation. Used by osu!taiko and osu!mania. + /// Allows tint and vertical scaling animation. Used in osu!taiko and osu!mania. /// public class AlternativeComboCounter : ULongCounter // btw, I'm terribly bad with names... OUENDAN! { public Color4 OriginalColour; public Color4 TintColour = Color4.OrangeRed; public int TintDuration = 500; - public float ScaleFactor = 1; + public float ScaleFactor = 2; public EasingTypes TintEasing = EasingTypes.None; public bool CanAnimateWhenBackwards = false; @@ -72,7 +72,7 @@ namespace osu.Game.Graphics.UserInterface { if (countSpriteText != null) { - countSpriteText.Text = newValue.ToString(@"#,0"); + countSpriteText.Text = newValue.ToString("#,0"); if (newValue == 0) { countSpriteText.FadeOut(TintDuration); diff --git a/osu.Game/Graphics/UserInterface/CatchComboCounter.cs b/osu.Game/Graphics/UserInterface/CatchComboCounter.cs index d68c163fa6..6f6d586cb8 100644 --- a/osu.Game/Graphics/UserInterface/CatchComboCounter.cs +++ b/osu.Game/Graphics/UserInterface/CatchComboCounter.cs @@ -11,7 +11,7 @@ using System.Threading.Tasks; namespace osu.Game.Graphics.UserInterface { /// - /// Similar to Standard, but without the 'x' and has colour shadows. Used by osu!catch. + /// Similar to Standard, but without the 'x' and has tinted pop-ups. Used in osu!catch. /// public class CatchComboCounter : StandardComboCounter { @@ -36,6 +36,7 @@ namespace osu.Game.Graphics.UserInterface } else { + // Backwards pop-up animation has no tint colour popOutSpriteText.Colour = countSpriteText.Colour; transformCount(new TranformULongCounter(Clock), currentValue, newValue); } diff --git a/osu.Game/Graphics/UserInterface/RollingCounter.cs b/osu.Game/Graphics/UserInterface/RollingCounter.cs index 4e7e3ad6f3..780c747e96 100644 --- a/osu.Game/Graphics/UserInterface/RollingCounter.cs +++ b/osu.Game/Graphics/UserInterface/RollingCounter.cs @@ -14,7 +14,7 @@ using System.Threading.Tasks; namespace osu.Game.Graphics.UserInterface { /// - /// Skeleton for a counter with a simple rollover animation. + /// Skeleton for a counter with a simple roll-up animation. /// /// Type of the actual counter. public abstract class RollingCounter : Container @@ -35,18 +35,18 @@ namespace osu.Game.Graphics.UserInterface /// /// If true, each time the Count is updated, it will roll over from the current visible value. - /// Else, it will roll over from the current count value. + /// Else, it will roll up from the current count value. /// public bool IsRollingContinuous = true; /// - /// If true, the rollover duration will be proportional to the counter. + /// If true, the roll-up duration will be proportional to the counter. /// public bool IsRollingProportional = false; /// - /// If IsRollingProportional = false, duration in milliseconds for the counter rollover animation for each element. - /// If IsRollingProportional = true, duration in milliseconds for the counter rollover animation in total. + /// If IsRollingProportional = false, duration in milliseconds for the counter roll-up animation for each element. + /// If IsRollingProportional = true, duration in milliseconds for the counter roll-up animation in total. /// public ulong RollingDuration = 0; @@ -90,7 +90,10 @@ namespace osu.Game.Graphics.UserInterface { if (Clock != null) { - RollingTotalDuration = IsRollingProportional ? GetProportionalDuration(VisibleCount, value) : RollingDuration; + RollingTotalDuration = + IsRollingProportional + ? GetProportionalDuration(VisibleCount, value) + : RollingDuration; transformCount(IsRollingContinuous ? VisibleCount : count, value); } count = value; @@ -117,11 +120,12 @@ namespace osu.Game.Graphics.UserInterface } /// - /// Calculates the duration of the rollover animation by using the difference between the current visible value and the new final value. + /// Calculates the duration of the roll-up animation by using the difference between the current visible value + /// and the new final value. /// /// - /// Intended to be used in conjunction with IsRolloverProportional = true. - /// If you're sure your superclass won't never need to be proportional, then it is not necessary to override this function. + /// Intended to be used in conjunction with IsRollingProportional = true. + /// Unless a derived class needs to have a proportional rolling, it is not necessary to override this function. /// /// Current visible value. /// New final value. @@ -178,15 +182,17 @@ namespace osu.Game.Graphics.UserInterface } /// - /// Called when the count is updated to add a transformer that changes the value of the visible count (i.e. implement the rollover animation). + /// Called when the count is updated to add a transformer that changes the value of the visible count (i.e. + /// implement the rollover animation). /// /// Count value before modification. /// Expected count value after modification- /// - /// Unless you need to set a custom animation according to the current or new value of the count, the recommended approach is to call - /// transformCount(CustomTransformer(Clock), currentValue, newValue), where CustomTransformer is a custom Transformer related to the - /// type T of the RolloverCounter. - /// By using this approach, there is no need to check if the Clock is not null; this validation is done before adding the transformer. + /// Unless you need to set a custom animation according to the current or new value of the count, the + /// recommended approach is to call transformCount(CustomTransformer(Clock), currentValue, newValue), where + /// CustomTransformer is a custom Transformer related to the type T of the RolloverCounter. + /// By using this approach, there is no need to check if the Clock is not null; this validation is done before + /// adding the transformer. /// protected abstract void transformCount(T currentValue, T newValue); diff --git a/osu.Game/Graphics/UserInterface/StandardComboCounter.cs b/osu.Game/Graphics/UserInterface/StandardComboCounter.cs index 437c4f011f..e0555c952e 100644 --- a/osu.Game/Graphics/UserInterface/StandardComboCounter.cs +++ b/osu.Game/Graphics/UserInterface/StandardComboCounter.cs @@ -12,7 +12,7 @@ using System.Threading.Tasks; namespace osu.Game.Graphics.UserInterface { /// - /// Uses the 'x' symbol and has a pop-out effect while rolling over. Used by osu! standard. + /// Uses the 'x' symbol and has a pop-out effect while rolling over. Used in osu! standard. /// public class StandardComboCounter : ULongCounter { @@ -44,11 +44,6 @@ namespace osu.Game.Graphics.UserInterface }); } - public override void ResetCount() - { - SetCountWithoutRolling(0); - } - protected override void updateTextSize() { base.updateTextSize(); diff --git a/osu.Game/Graphics/UserInterface/ULongCounter.cs b/osu.Game/Graphics/UserInterface/ULongCounter.cs index c01c4208c0..434607be4c 100644 --- a/osu.Game/Graphics/UserInterface/ULongCounter.cs +++ b/osu.Game/Graphics/UserInterface/ULongCounter.cs @@ -14,7 +14,7 @@ using System.Threading.Tasks; namespace osu.Game.Graphics.UserInterface { /// - /// A simple rollover counter that accepts unsigned long values. + /// A simple rolling counter that accepts unsigned long values. /// public class ULongCounter : RollingCounter {