Add counter to HUD

This commit is contained in:
smoogipoo 2021-09-30 17:55:00 +09:00
parent 4d8418e072
commit fab0d531be

View File

@ -68,6 +68,7 @@ namespace osu.Game.Skinning
var score = container.OfType<DefaultScoreCounter>().FirstOrDefault();
var accuracy = container.OfType<DefaultAccuracyCounter>().FirstOrDefault();
var combo = container.OfType<DefaultComboCounter>().FirstOrDefault();
var ppCounter = container.OfType<DefaultPerformancePointsCounter>().FirstOrDefault();
if (score != null)
{
@ -81,6 +82,13 @@ namespace osu.Game.Skinning
score.Position = new Vector2(0, vertical_offset);
if (ppCounter != null)
{
ppCounter.Y = score.Position.Y + score.ScreenSpaceDrawQuad.Size.Y;
ppCounter.Origin = Anchor.TopCentre;
ppCounter.Anchor = Anchor.TopCentre;
}
if (accuracy != null)
{
accuracy.Position = new Vector2(-accuracy.ScreenSpaceDeltaToParentSpace(score.ScreenSpaceDrawQuad.Size).X / 2 - horizontal_padding, vertical_offset + 5);
@ -123,6 +131,7 @@ namespace osu.Game.Skinning
new SongProgress(),
new BarHitErrorMeter(),
new BarHitErrorMeter(),
new DefaultPerformancePointsCounter()
}
};