1
0
mirror of https://github.com/ppy/osu.git synced 2024-11-06 06:57:39 +08:00

Merge pull request #22052 from Joehuu/fix-player-loader-logo-drag

Fix osu! logo not being draggable on player loader
This commit is contained in:
Salman Ahmed 2023-01-08 22:35:21 +03:00 committed by GitHub
commit ff48bd68ff
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -282,7 +282,7 @@ namespace osu.Game.Screens.Menu
if (beatIndex < 0) return;
if (IsHovered)
if (Action != null && IsHovered)
{
this.Delay(early_activation).Schedule(() =>
{
@ -361,11 +361,11 @@ namespace osu.Game.Screens.Menu
}
}
public override bool HandlePositionalInput => base.HandlePositionalInput && Action != null && Alpha > 0.2f;
public override bool HandlePositionalInput => base.HandlePositionalInput && Alpha > 0.2f;
protected override bool OnMouseDown(MouseDownEvent e)
{
if (e.Button != MouseButton.Left) return false;
if (e.Button != MouseButton.Left) return true;
logoBounceContainer.ScaleTo(0.9f, 1000, Easing.Out);
return true;
@ -380,18 +380,21 @@ namespace osu.Game.Screens.Menu
protected override bool OnClick(ClickEvent e)
{
if (Action?.Invoke() ?? true)
sampleClick.Play();
flashLayer.ClearTransforms();
flashLayer.Alpha = 0.4f;
flashLayer.FadeOut(1500, Easing.OutExpo);
if (Action?.Invoke() == true)
sampleClick.Play();
return true;
}
protected override bool OnHover(HoverEvent e)
{
logoHoverContainer.ScaleTo(1.1f, 500, Easing.OutElastic);
if (Action != null)
logoHoverContainer.ScaleTo(1.1f, 500, Easing.OutElastic);
return true;
}