From 7ae70c7c16c3e14d0a7798d403a4a95ce0d948ff Mon Sep 17 00:00:00 2001 From: yugecin Date: Sun, 13 Nov 2016 00:41:04 +0100 Subject: [PATCH] catch escape key in overlay --- src/yugecin/opsudance/ui/SBOverlay.java | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/yugecin/opsudance/ui/SBOverlay.java b/src/yugecin/opsudance/ui/SBOverlay.java index 4e4c49b3..20e3a6c6 100644 --- a/src/yugecin/opsudance/ui/SBOverlay.java +++ b/src/yugecin/opsudance/ui/SBOverlay.java @@ -126,6 +126,12 @@ public class SBOverlay { index++; setMusicPosition(); updateIndex(index); + } else if (key == Input.KEY_ESCAPE && menu) { + menu = false; + if (speed != 0) { + MusicController.resume(); + } + return true; } return false; }