From fcea52dd3a6c7eb3751f54eba2cff7a93b236577 Mon Sep 17 00:00:00 2001 From: Dean Herbert Date: Wed, 5 Apr 2017 13:53:07 +0900 Subject: [PATCH] Fix strong drumrolls (again). --- .../Objects/Drawables/Pieces/CirclePiece.cs | 10 +++++----- .../Objects/Drawables/Pieces/ElongatedCirclePiece.cs | 11 +++++++---- 2 files changed, 12 insertions(+), 9 deletions(-) diff --git a/osu.Game.Modes.Taiko/Objects/Drawables/Pieces/CirclePiece.cs b/osu.Game.Modes.Taiko/Objects/Drawables/Pieces/CirclePiece.cs index 0ac96b02a3..76bc60d887 100644 --- a/osu.Game.Modes.Taiko/Objects/Drawables/Pieces/CirclePiece.cs +++ b/osu.Game.Modes.Taiko/Objects/Drawables/Pieces/CirclePiece.cs @@ -26,7 +26,7 @@ namespace osu.Game.Modes.Taiko.Objects.Drawables.Pieces /// /// The amount to scale up the base circle to show it as a "strong" piece. /// - private const float strong_scale = 1.5f; + protected const float STRONG_SCALE = 1.5f; /// /// The colour of the inner circle and outer glows. @@ -117,7 +117,7 @@ namespace osu.Game.Modes.Taiko.Objects.Drawables.Pieces content = new Container { RelativeSizeAxes = Axes.Both, - Name = "Symbol", + Name = "Content", Anchor = Anchor.Centre, Origin = Anchor.Centre, } @@ -125,10 +125,10 @@ namespace osu.Game.Modes.Taiko.Objects.Drawables.Pieces if (isStrong) { - Size *= strong_scale; + Size *= STRONG_SCALE; - //for symbols etc. - Content.Scale *= strong_scale; + //default for symbols etc. + Content.Scale *= STRONG_SCALE; } } diff --git a/osu.Game.Modes.Taiko/Objects/Drawables/Pieces/ElongatedCirclePiece.cs b/osu.Game.Modes.Taiko/Objects/Drawables/Pieces/ElongatedCirclePiece.cs index 396392b556..d203c4ea05 100644 --- a/osu.Game.Modes.Taiko/Objects/Drawables/Pieces/ElongatedCirclePiece.cs +++ b/osu.Game.Modes.Taiko/Objects/Drawables/Pieces/ElongatedCirclePiece.cs @@ -21,18 +21,21 @@ namespace osu.Game.Modes.Taiko.Objects.Drawables.Pieces public ElongatedCirclePiece(bool isStrong = false) : base(isStrong) { + if (isStrong) + { + //undo the strong scale provided in CirclePiece. + Content.Scale /= STRONG_SCALE; + } } protected override void Update() { base.Update(); - var contentPadding = DrawHeight / 2 * Content.Scale.X; - Content.Padding = new MarginPadding { - Left = contentPadding, - Right = contentPadding, + Left = DrawHeight / 2, + Right = DrawHeight / 2, }; Width = (PlayfieldLengthReference?.Invoke() ?? 0) * Length + DrawHeight;