From 11b474e1949ea71367681c3ccfa8b1c3daad88c2 Mon Sep 17 00:00:00 2001 From: Dean Herbert Date: Sun, 24 Mar 2019 12:19:09 +0900 Subject: [PATCH] Handle released for safety --- osu.Game/Screens/Play/GameplayMenuOverlay.cs | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/osu.Game/Screens/Play/GameplayMenuOverlay.cs b/osu.Game/Screens/Play/GameplayMenuOverlay.cs index c3b9d93ef0..2fac8de799 100644 --- a/osu.Game/Screens/Play/GameplayMenuOverlay.cs +++ b/osu.Game/Screens/Play/GameplayMenuOverlay.cs @@ -243,12 +243,22 @@ public bool OnPressed(GlobalAction action) case GlobalAction.Select: SelectAction.Invoke(); return true; - default: - return false; } + + return false; } - public bool OnReleased(GlobalAction action) => false; + public bool OnReleased(GlobalAction action) + { + switch (action) + { + case GlobalAction.Back: + case GlobalAction.Select: + return true; + } + + return false; + } private void buttonSelectionChanged(DialogButton button, bool isSelected) {