1
0
mirror of https://github.com/ppy/osu.git synced 2024-12-13 08:32:57 +08:00

Fix main menu eating keys if user presses too fast

This commit is contained in:
Dean Herbert 2024-02-26 22:22:43 +08:00
parent d6622c1756
commit 4c6e8a606f
No known key found for this signature in database

View File

@ -64,6 +64,10 @@ namespace osu.Game.Screens.Menu
private Sample? sampleHover;
private SampleChannel? sampleChannel;
public override bool IsPresent => base.IsPresent
// Allow keyboard interaction based on state rather than waiting for delayed animations.
|| state == ButtonState.Expanded;
public override bool ReceivePositionalInputAt(Vector2 screenSpacePos) => box.ReceivePositionalInputAt(screenSpacePos);
public MainMenuButton(LocalisableString text, string sampleName, IconUsage symbol, Color4 colour, Action? clickAction = null, float extraWidth = 0, params Key[] triggerKeys)