1
0
mirror of https://github.com/ppy/osu.git synced 2026-05-18 04:19:53 +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
Unverified
parent d6622c1756
commit 4c6e8a606f
+4
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)