1
0
mirror of https://github.com/ppy/osu.git synced 2025-01-12 15:22:55 +08:00

Extend input handling of osu! logo to full border area

This is the easiest way to make this happen. It does mean the pink area
is being drawn behind the white border, but I haven't found a scenario
where this is noticeable.

Closes #4217.
This commit is contained in:
Dean Herbert 2023-05-03 14:57:31 +09:00
parent 6b017ac05f
commit 453143813f

View File

@ -35,6 +35,12 @@ namespace osu.Game.Screens.Menu
private const double transition_length = 300; 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>
private static readonly Vector2 scale_adjust = new Vector2(0.96f);
private readonly Sprite logo; private readonly Sprite logo;
private readonly CircularContainer logoContainer; private readonly CircularContainer logoContainer;
private readonly Container logoBounceContainer; private readonly Container logoBounceContainer;
@ -150,7 +156,7 @@ namespace osu.Game.Screens.Menu
Origin = Anchor.Centre, Origin = Anchor.Centre,
Anchor = Anchor.Centre, Anchor = Anchor.Centre,
Alpha = visualizer_default_alpha, Alpha = visualizer_default_alpha,
Size = new Vector2(0.96f) Size = scale_adjust
}, },
new Container new Container
{ {
@ -162,7 +168,7 @@ namespace osu.Game.Screens.Menu
Anchor = Anchor.Centre, Anchor = Anchor.Centre,
Origin = Anchor.Centre, Origin = Anchor.Centre,
RelativeSizeAxes = Axes.Both, RelativeSizeAxes = Axes.Both,
Scale = new Vector2(0.88f), Scale = scale_adjust,
Masking = true, Masking = true,
Children = new Drawable[] Children = new Drawable[]
{ {