mirror of
https://github.com/ppy/osu.git
synced 2025-01-15 09:22:54 +08:00
Move thickness to a constant
This commit is contained in:
parent
e76f8bdd64
commit
12a9843835
@ -48,11 +48,13 @@ namespace osu.Game.Screens.Edit.Compose.Components.Timeline
|
|||||||
{
|
{
|
||||||
var yOffset = Children.Count(d => d.X == h.StartTime);
|
var yOffset = Children.Count(d => d.X == h.StartTime);
|
||||||
|
|
||||||
Add(new TimelineHitObjectRepresentation(h) { Y = -yOffset * 4 });
|
Add(new TimelineHitObjectRepresentation(h) { Y = -yOffset * TimelineHitObjectRepresentation.THICKNESS });
|
||||||
}
|
}
|
||||||
|
|
||||||
private class TimelineHitObjectRepresentation : CompositeDrawable
|
private class TimelineHitObjectRepresentation : CompositeDrawable
|
||||||
{
|
{
|
||||||
|
public const float THICKNESS = 3;
|
||||||
|
|
||||||
public readonly HitObject HitObject;
|
public readonly HitObject HitObject;
|
||||||
|
|
||||||
public TimelineHitObjectRepresentation(HitObject hitObject)
|
public TimelineHitObjectRepresentation(HitObject hitObject)
|
||||||
@ -74,7 +76,7 @@ namespace osu.Game.Screens.Edit.Compose.Components.Timeline
|
|||||||
{
|
{
|
||||||
CornerRadius = 2,
|
CornerRadius = 2,
|
||||||
Masking = true,
|
Masking = true,
|
||||||
Size = new Vector2(1, 3),
|
Size = new Vector2(1, THICKNESS),
|
||||||
Anchor = Anchor.CentreLeft,
|
Anchor = Anchor.CentreLeft,
|
||||||
Origin = Anchor.CentreLeft,
|
Origin = Anchor.CentreLeft,
|
||||||
RelativePositionAxes = Axes.X,
|
RelativePositionAxes = Axes.X,
|
||||||
@ -96,7 +98,7 @@ namespace osu.Game.Screens.Edit.Compose.Components.Timeline
|
|||||||
AlwaysPresent = true,
|
AlwaysPresent = true,
|
||||||
Colour = Color4.White,
|
Colour = Color4.White,
|
||||||
BorderColour = Color4.Black,
|
BorderColour = Color4.Black,
|
||||||
BorderThickness = 3,
|
BorderThickness = THICKNESS,
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user