1
0
mirror of https://github.com/ppy/osu.git synced 2025-01-26 18:52:55 +08:00

Adjust visuals of osu!mania barlines to be less present

Roughly matches the new design. Metrics adjusted to fit with the existing design.

Closes #19611 maybe?
This commit is contained in:
Dean Herbert 2022-08-08 17:38:56 +09:00
parent d3ee2a0b8e
commit 1f4b87d233

View File

@ -1,12 +1,9 @@
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
// See the LICENCE file in the repository root for full licence text.
#nullable disable
using osu.Framework.Graphics;
using osu.Framework.Graphics.Shapes;
using osuTK;
using osuTK.Graphics;
namespace osu.Game.Rulesets.Mania.Objects.Drawables
{
@ -16,21 +13,11 @@ namespace osu.Game.Rulesets.Mania.Objects.Drawables
/// </summary>
public class DrawableBarLine : DrawableManiaHitObject<BarLine>
{
/// <summary>
/// Height of major bar line triangles.
/// </summary>
private const float triangle_height = 12;
/// <summary>
/// Offset of the major bar line triangles from the sides of the bar line.
/// </summary>
private const float triangle_offset = 9;
public DrawableBarLine(BarLine barLine)
: base(barLine)
{
RelativeSizeAxes = Axes.X;
Height = 2f;
Height = barLine.Major ? 1.7f : 1.2f;
AddInternal(new Box
{
@ -38,34 +25,33 @@ namespace osu.Game.Rulesets.Mania.Objects.Drawables
Anchor = Anchor.BottomCentre,
Origin = Anchor.BottomCentre,
RelativeSizeAxes = Axes.Both,
Colour = new Color4(255, 204, 33, 255),
Alpha = barLine.Major ? 0.5f : 0.2f
});
if (barLine.Major)
{
AddInternal(new EquilateralTriangle
Vector2 size = new Vector2(22, 6);
const float triangle_offset = 4;
AddInternal(new Circle
{
Name = "Left triangle",
Anchor = Anchor.BottomLeft,
Origin = Anchor.TopCentre,
Size = new Vector2(triangle_height),
Name = "Left line",
Anchor = Anchor.CentreLeft,
Origin = Anchor.CentreRight,
Size = size,
X = -triangle_offset,
Rotation = 90
});
AddInternal(new EquilateralTriangle
AddInternal(new Circle
{
Name = "Right triangle",
Anchor = Anchor.BottomRight,
Origin = Anchor.TopCentre,
Size = new Vector2(triangle_height),
Name = "Right line",
Anchor = Anchor.CentreRight,
Origin = Anchor.CentreLeft,
Size = size,
X = triangle_offset,
Rotation = -90
});
}
if (!barLine.Major)
Alpha = 0.2f;
}
protected override void UpdateInitialTransforms()