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

Merge pull request #23386 from peppy/fix-osu-logo-input-handling

Extend input handling of osu! logo to full border area
This commit is contained in:
Bartłomiej Dach 2023-05-03 17:48:51 +02:00 committed by GitHub
commit fa3f42ba75
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 10 additions and 4 deletions

View File

@ -131,7 +131,7 @@ namespace osu.Game.Screens.Menu
Anchor = Anchor.Centre,
Origin = Anchor.Centre,
Colour = Color4.DarkBlue,
Size = new Vector2(0.96f)
Size = OsuLogo.SCALE_ADJUST,
},
new Circle
{

View File

@ -35,6 +35,12 @@ namespace osu.Game.Screens.Menu
private const double transition_length = 300;
/// <summary>
/// The osu! logo sprite has a shadow included in its texture.
/// This adjustment vector is used to match the precise edge of the border of the logo.
/// </summary>
public static readonly Vector2 SCALE_ADJUST = new Vector2(0.96f);
private readonly Sprite logo;
private readonly CircularContainer logoContainer;
private readonly Container logoBounceContainer;
@ -150,7 +156,7 @@ namespace osu.Game.Screens.Menu
Origin = Anchor.Centre,
Anchor = Anchor.Centre,
Alpha = visualizer_default_alpha,
Size = new Vector2(0.96f)
Size = SCALE_ADJUST
},
new Container
{
@ -162,7 +168,7 @@ namespace osu.Game.Screens.Menu
Anchor = Anchor.Centre,
Origin = Anchor.Centre,
RelativeSizeAxes = Axes.Both,
Scale = new Vector2(0.88f),
Scale = SCALE_ADJUST,
Masking = true,
Children = new Drawable[]
{
@ -406,7 +412,7 @@ namespace osu.Game.Screens.Menu
public void Impact()
{
impactContainer.FadeOutFromOne(250, Easing.In);
impactContainer.ScaleTo(0.96f);
impactContainer.ScaleTo(SCALE_ADJUST);
impactContainer.ScaleTo(1.12f, 250);
}