Merge pull request #24292 from peppy/legacy-skin-alignment

Fix some UI elements in legacy skins not always aligning correctly
This commit is contained in:
Bartłomiej Dach 2023-07-21 21:48:03 +02:00 committed by GitHub
commit e2e3581674
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 5 additions and 5 deletions

View File

@ -17,8 +17,8 @@ namespace osu.Game.Skinning
Anchor = Anchor.TopRight;
Origin = Anchor.TopRight;
Scale = new Vector2(0.6f);
Margin = new MarginPadding(10);
Scale = new Vector2(0.6f * 0.96f);
Margin = new MarginPadding { Vertical = 9, Horizontal = 17 };
}
protected sealed override OsuSpriteText CreateSpriteText() => new LegacySpriteText(LegacyFont.Score)

View File

@ -21,7 +21,7 @@ namespace osu.Game.Skinning
Origin = Anchor.TopRight;
Scale = new Vector2(0.96f);
Margin = new MarginPadding(10);
Margin = new MarginPadding { Horizontal = 10 };
}
protected sealed override OsuSpriteText CreateSpriteText() => new LegacySpriteText(LegacyFont.Score)

View File

@ -368,7 +368,7 @@ namespace osu.Game.Skinning
{
songProgress.Anchor = Anchor.TopRight;
songProgress.Origin = Anchor.CentreRight;
songProgress.X = -accuracy.ScreenSpaceDeltaToParentSpace(accuracy.ScreenSpaceDrawQuad.Size).X - 10;
songProgress.X = -accuracy.ScreenSpaceDeltaToParentSpace(accuracy.ScreenSpaceDrawQuad.Size).X - 18;
songProgress.Y = container.ToLocalSpace(accuracy.ScreenSpaceDrawQuad.TopLeft).Y + (accuracy.ScreenSpaceDeltaToParentSpace(accuracy.ScreenSpaceDrawQuad.Size).Y / 2);
}
@ -397,8 +397,8 @@ namespace osu.Game.Skinning
new LegacyComboCounter(),
new LegacyScoreCounter(),
new LegacyAccuracyCounter(),
new LegacyHealthDisplay(),
new LegacySongProgress(),
new LegacyHealthDisplay(),
new BarHitErrorMeter(),
new DefaultKeyCounterDisplay()
}