1
0
mirror of https://github.com/ppy/osu.git synced 2024-09-21 21:27:24 +08:00

Merge pull request #14735 from AbstractQbit/fix-bar-hit-icons

Fix icon orientation for horizontal bar hit error meter
This commit is contained in:
Bartłomiej Dach 2021-09-13 19:03:42 +02:00 committed by GitHub
commit 52b1539dea
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -33,6 +33,8 @@ namespace osu.Game.Screens.Play.HUD.HitErrorMeters
private const float chevron_size = 8;
private SpriteIcon arrow;
private SpriteIcon iconEarly;
private SpriteIcon iconLate;
private Container colourBarsEarly;
private Container colourBarsLate;
@ -97,25 +99,21 @@ namespace osu.Game.Screens.Play.HUD.HitErrorMeters
RelativeSizeAxes = Axes.Both,
Height = 0.5f,
},
new SpriteIcon
iconEarly = new SpriteIcon
{
Y = -10,
Size = new Vector2(10),
Icon = FontAwesome.Solid.ShippingFast,
Anchor = Anchor.TopCentre,
Origin = Anchor.Centre,
// undo any layout rotation to display the icon the correct orientation
Rotation = -Rotation,
},
new SpriteIcon
iconLate = new SpriteIcon
{
Y = 10,
Size = new Vector2(10),
Icon = FontAwesome.Solid.Bicycle,
Anchor = Anchor.BottomCentre,
Origin = Anchor.Centre,
// undo any layout rotation to display the icon the correct orientation
Rotation = -Rotation,
}
}
},
@ -143,6 +141,15 @@ namespace osu.Game.Screens.Play.HUD.HitErrorMeters
arrow.Delay(200).FadeInFromZero(600);
}
protected override void Update()
{
base.Update();
// undo any layout rotation to display icons in the correct orientation
iconEarly.Rotation = -Rotation;
iconLate.Rotation = -Rotation;
}
private void createColourBars(OsuColour colours)
{
var windows = HitWindows.GetAllAvailableWindows().ToArray();