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:
parent
fdd17c1575
commit
2ee68ae75a
@ -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)
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
@ -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
|
||||||
|
Loading…
Reference in New Issue
Block a user