mirror of
https://github.com/ppy/osu.git
synced 2026-06-03 18:44:15 +08:00
Merge pull request #33972 from peppy/sheared-button-block-mouse
Make `ShearedButton` block mouse down events
This commit is contained in:
@@ -179,7 +179,7 @@ namespace osu.Game.Graphics.UserInterface
|
||||
protected override bool OnMouseDown(MouseDownEvent e)
|
||||
{
|
||||
Content.ScaleTo(0.9f, 2000, Easing.OutQuint);
|
||||
return base.OnMouseDown(e);
|
||||
return true;
|
||||
}
|
||||
|
||||
protected override void OnMouseUp(MouseUpEvent e)
|
||||
|
||||
@@ -14,6 +14,7 @@ using osu.Framework.Graphics;
|
||||
using osu.Framework.Graphics.Colour;
|
||||
using osu.Framework.Graphics.Containers;
|
||||
using osu.Framework.Graphics.Sprites;
|
||||
using osu.Framework.Input.Events;
|
||||
using osu.Framework.Threading;
|
||||
using osu.Game.Beatmaps;
|
||||
using osu.Game.Graphics;
|
||||
@@ -82,6 +83,13 @@ namespace osu.Game.Screens.SelectV2
|
||||
|
||||
private const float personal_best_height = 112;
|
||||
|
||||
// Blocking mouse down is required to avoid song select's background reveal logic happening while hovering scores.
|
||||
// Our horizontal alignment doesn't really align with the rest of the sheared components (protrudes a touch to the right) which makes
|
||||
// it complicated to handle this at a higher level.
|
||||
public override bool ReceivePositionalInputAt(Vector2 screenSpacePos) => scoresScroll.ReceivePositionalInputAt(screenSpacePos);
|
||||
|
||||
protected override bool OnMouseDown(MouseDownEvent e) => true;
|
||||
|
||||
[BackgroundDependencyLoader]
|
||||
private void load()
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user