1
0
mirror of https://github.com/ppy/osu.git synced 2025-01-28 20:32:55 +08:00

Make CirclePiece use relative width (leaving length control to DrawableDrumRoll).

This commit is contained in:
smoogipooo 2017-03-24 20:09:58 +09:00
parent fdd17c1575
commit 2ee68ae75a
2 changed files with 5 additions and 4 deletions

View File

@ -81,19 +81,19 @@ namespace osu.Desktop.VisualTests.Tests
Add(new DrumRollCircle(new CirclePiece() Add(new DrumRollCircle(new CirclePiece()
{ {
Width = 250,
KiaiMode = kiai KiaiMode = kiai
}) })
{ {
Width = 250,
Position = new Vector2(575, 100) Position = new Vector2(575, 100)
}); });
Add(new DrumRollCircle(new AccentedCirclePiece() Add(new DrumRollCircle(new AccentedCirclePiece()
{ {
Width = 250,
KiaiMode = kiai KiaiMode = kiai
}) })
{ {
Width = 250,
Position = new Vector2(575, 300) Position = new Vector2(575, 300)
}); });
} }

View File

@ -14,8 +14,8 @@ namespace osu.Game.Modes.Taiko.Objects.Drawable.Pieces
/// <summary> /// <summary>
/// A circle piece which is used uniformly through osu!taiko to visualise hitobjects. /// A circle piece which is used uniformly through osu!taiko to visualise hitobjects.
/// <para> /// <para>
/// The body of this piece will overshoot it by <see cref="CirclePiece.Height"/> to form /// The body of this piece will overshoot its parent by <see cref="CirclePiece.Height"/> to form
/// a rounded (_[-Width-]_) figure such that a regular "circle" is the result of setting Width to 0. /// a rounded (_[-Width-]_) figure such that a regular "circle" is the result of a parent with Width = 0.
/// </para> /// </para>
/// </summary> /// </summary>
public class CirclePiece : Container public class CirclePiece : Container
@ -71,6 +71,7 @@ namespace osu.Game.Modes.Taiko.Objects.Drawable.Pieces
public CirclePiece() public CirclePiece()
{ {
RelativeSizeAxes = Axes.X;
Height = TaikoHitObject.CIRCLE_RADIUS * 2; Height = TaikoHitObject.CIRCLE_RADIUS * 2;
// The "inner layer" is the body of the CirclePiece that overshoots it by Height/2 px on both sides // The "inner layer" is the body of the CirclePiece that overshoots it by Height/2 px on both sides