1
0
mirror of https://github.com/ppy/osu.git synced 2025-03-19 01:17:19 +08:00

Fix strong drumrolls (again).

This commit is contained in:
Dean Herbert 2017-04-05 13:53:07 +09:00
parent 0e0ab6904d
commit fcea52dd3a
No known key found for this signature in database
GPG Key ID: 46D71BF4958ABB49
2 changed files with 12 additions and 9 deletions

View File

@ -26,7 +26,7 @@ namespace osu.Game.Modes.Taiko.Objects.Drawables.Pieces
/// <summary>
/// The amount to scale up the base circle to show it as a "strong" piece.
/// </summary>
private const float strong_scale = 1.5f;
protected const float STRONG_SCALE = 1.5f;
/// <summary>
/// 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;
}
}

View File

@ -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;